High

PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF

  • Disclosed: 06.08.2026
  • Updated: 11.10.2026 10:22

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package pdfjs-dist >= 5.6.83, < 6.2.108 6.2.108

References

CVSS score -
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
Weakness (CWE)
CWE-79
Platform
npm
Package
pdfjs-dist
Disclosed
06.08.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-hq66-cqwq-w95j - CC BY 4.0

Vulnerability history: pdfjs-dist

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
05.2022 08.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 2

Disclosures per year

  1. 2022: 1
  2. 2023: 0
  3. 2024: 1
  4. 2025: 0
  5. 2026: 1
  1. PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF this entry
    High CVE-2026-16633 >= 5.6.83, < 6.2.108 6.2.108
  2. Medium · 6.4 CVE-2024-4367 < 4.2.67 4.2.67
  3. Medium · 6.4 CVE-2018-5158 >= 2.0.0, < 2.0.550, < 1.10.100 2.0.550, 1.10.100

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.