Is pdfjs-dist 2.0 vulnerable?

npm · 159 releases from 2.0.87 to 2.0.943 · latest pdfjs-dist is 6.4.299 · checked 1 Nov 2026

Yes: 1 known advisory

Yes. pdfjs-dist 2.0.943, the last 2.0 release, is affected by 1 known security advisory (1 high), including CVE-2024-4367. 1 more affects earlier 2.0.x releases. Upgrade to 4.2.67 or later to fix all of them.

Upgrade with:npm install pdfjs-dist@4.2.67

Is your project affected?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Advisories affecting pdfjs-dist 2.0.943

  • HighCVE-2024-4367GHSA-wgrm-67xf-hhpq7 May 2024

    PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

    Affected
    <4.2.67
    Fixed in
    4.2.67

Fixed within 2.0.x, affecting earlier releases

  • HighCVE-2018-5158GHSA-7jg2-jgv3-fmr414 May 2022

    Malicious PDF can inject JavaScript into PDF Viewer

    Affected
    >=2.0.0 <2.0.550 · <1.10.100
    Fixed in
    1.10.100, 2.0.550

Which of your client projects are still on pdfjs-dist 2.0?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact pdfjs-dist version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other pdfjs-dist versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.