Skip to content

← Public intelligence

npm package

pdfjs-dist

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

3 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.6npmPublished

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

    CVE-2026-16633 · GHSA-hq66-cqwq-w95j

    Affected
    • npm pdfjs-dist >= 5.6.83, < 6.2.108
    Fixed in
    6.2.108· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 6.2.108 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 8.8npmAmendedPublished

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

    CVE-2024-4367 · GHSA-wgrm-67xf-hhpq

    Affected
    • npm pdfjs-dist <= 4.1.392
    Fixed in
    4.2.67· Vendor fix available
    Issue
    Impact If pdf.js is used to load a malicious PDF, and PDF.js is configured with isEvalSupported set to true (which is the default value), unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain. Patches The patch removes the use of eval: https://github.com/mozilla/pdf.js/pull/18015 Workarounds Set the option isEvalSupported to false. References https://bugzilla.mozilla.org/showbug.cgi?id=1893645

    Recommended action: Upgrade to 4.2.67 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 8.8npmAmendedPublished

    Malicious PDF can inject JavaScript into PDF Viewer

    CVE-2018-5158 · GHSA-7jg2-jgv3-fmr4

    Affected
    • npm pdfjs-dist >= 2.0.0, < 2.0.550; < 1.10.100
    Fixed in
    2.0.5501.10.100· Vendor fix available
    Issue
    The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file. This JavaScript can then be run with the permissions of the PDF viewer by its worker. This vulnerability affects Firefox ESR < 52.8, Firefox < 60 and PDF.js < 2.0.550.

    Recommended action: Upgrade to 2.0.550 or 1.10.100 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →