GitHub Advisoryadvisory · npm
GHSA-hq66-cqwq-w95j PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF
HIGH
Official page ↗
- Aliases
- CVE-2026-16633
- Ecosystem
- npm
- Packages
- pdfjs-dist
- Severity
- High
- CVSS vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
- Weaknesses
- CWE-79
- Reviewed
- 2026-08-06
Affected packages
• npm pdfjs-dist: >= 5.6.83, < 6.2.108 → fixed in 6.2.108
Description
Impact
If PDF.js is used to load a malicious PDF, and PDF.js is configured with `enableScripting` set to true (which is the default value) and no CSP for disallowing script-src, unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.
Patches
Workarounds
Set `enableScripting` to `false` or set a CSP.
Related
Alias · not in database (1)
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness