Pdfjs dist: PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF (CVE-2026-16633)
A vulnerability in pdfjs-dist allows arbitrary JavaScript execution when opening a malicious PDF if scripting is enabled (enableScripting=true) and no Content Security Policy (CSP) restricts script sources. This can lead to attacker-controlled script running in the context of the hosting domain. The issue affects versions from 5.6.83 up to but not including 6.2.108. A patch is available, and mitigation includes disabling scripting or applying a CSP.
AI Analysis
Technical Summary
The pdfjs-dist library has a vulnerability (CVE-2026-16633) where if it loads a malicious PDF with enableScripting set to true (default) and no restrictive CSP, arbitrary JavaScript controlled by an attacker executes in the hosting domain context. This is a cross-site scripting (CWE-79) issue. The vulnerability affects versions >=5.6.83 and <6.2.108. The CVSS 4.0 vector indicates network attack vector, low complexity, no privileges or user interaction required, with high impact on confidentiality and integrity. A patch is available to fix this issue.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the hosting domain, potentially leading to data theft, session hijacking, or other malicious actions within that domain. This can compromise the security of applications embedding pdfjs-dist with scripting enabled and no CSP restrictions.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade to a fixed version of pdfjs-dist (version 6.2.108 or later). Alternatively, setting enableScripting to false or implementing a Content Security Policy (CSP) that disallows script-src can mitigate the risk.
Pdfjs dist: PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF (CVE-2026-16633)
Description
A vulnerability in pdfjs-dist allows arbitrary JavaScript execution when opening a malicious PDF if scripting is enabled (enableScripting=true) and no Content Security Policy (CSP) restricts script sources. This can lead to attacker-controlled script running in the context of the hosting domain. The issue affects versions from 5.6.83 up to but not including 6.2.108. A patch is available, and mitigation includes disabling scripting or applying a CSP.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The pdfjs-dist library has a vulnerability (CVE-2026-16633) where if it loads a malicious PDF with enableScripting set to true (default) and no restrictive CSP, arbitrary JavaScript controlled by an attacker executes in the hosting domain context. This is a cross-site scripting (CWE-79) issue. The vulnerability affects versions >=5.6.83 and <6.2.108. The CVSS 4.0 vector indicates network attack vector, low complexity, no privileges or user interaction required, with high impact on confidentiality and integrity. A patch is available to fix this issue.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the hosting domain, potentially leading to data theft, session hijacking, or other malicious actions within that domain. This can compromise the security of applications embedding pdfjs-dist with scripting enabled and no CSP restrictions.
Mitigation Recommendations
A patch is available for this vulnerability. Users should upgrade to a fixed version of pdfjs-dist (version 6.2.108 or later). Alternatively, setting enableScripting to false or implementing a Content Security Policy (CSP) that disallows script-src can mitigate the risk.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hq66-cqwq-w95j
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-16633"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a7573bebf8831d539d9438a
Added to database: 08/07/2026, 05:57:18 UTC
Last enriched: 08/07/2026, 06:26:21 UTC
Last updated: 08/07/2026, 19:02:12 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.