mirror of
https://github.com/projectdiscovery/nuclei-templates.git
synced 2026-01-31 15:53:33 +08:00
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
id: pdfjs-content-spoofing
|
|
|
|
info:
|
|
name: Mozilla PDF.js - Content Spoofing
|
|
author: 0x_Akoko
|
|
severity: medium
|
|
description: |
|
|
Detected PDF.js viewer loads and renders external PDF files without proper origin validation. Versions < v1.3.91 are vulnerable to content spoofing attacks.
|
|
reference:
|
|
- https://groups.google.com/g/mozilla.dev.pdf-js/c/_WdU9T0TRfo
|
|
- https://github.com/mozilla/pdf.js/issues/6920
|
|
classification:
|
|
cwe-id: CWE-451
|
|
metadata:
|
|
verified: true
|
|
max-request: 5
|
|
tags: pdfjs,spoofing,headless
|
|
|
|
headless:
|
|
- steps:
|
|
- args:
|
|
url: "{{BaseURL}}/{{path}}?file=https://raw.githubusercontent.com/projectdiscovery/nuclei-templates/main/helpers/payloads/mozila-content-spoof.pdf"
|
|
action: navigate
|
|
|
|
- action: waitload
|
|
|
|
payloads:
|
|
path:
|
|
- "pdf.js/web/viewer.html"
|
|
- "pdfjs/web/viewer.html"
|
|
- "web/viewer.html"
|
|
- "pdfjs-dist/web/viewer.html"
|
|
- "uiFramework/js/pdfjs/web/viewer.html"
|
|
|
|
stop-at-first-match: true
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "mozila-content-spoof.pdf"
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "pdf.js"
|
|
|
|
- type: word
|
|
part: body
|
|
negative: true
|
|
words:
|
|
- "file origin does not match"
|
|
- "blocked"
|
|
- "Not Found"
|
|
condition: or
|