# CVE-2025-68428: parallax jsPDF path traversal in Node.js loadFile method

Source: https://junglewise.ai/threats/cve-2025-68428-parallax-jspdf-path-traversal-in-node-js-loadfile-method  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-01-05. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2025-68428 · Severity: high · CVSS 7.5 · Published 2026-01-05

jsPDF is a popular JavaScript library used to generate PDF documents. In versions prior to 4.0.0, a security flaw in the Node.js version of the library allows attackers to access sensitive files on the server's local file system. By providing a malicious file path, an attacker can force the application to include private system files or data directly into a generated PDF, leading to significant data exposure.

Technologies: [jspdf (npm)](https://junglewise.ai/threats/technologies/jspdf). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2025-68428 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-68428 being exploited in the wild.

**How severe is CVE-2025-68428?** High severity, with a CVSS score of 7.5, published 5 January 2026.

**Which products and versions are affected?** jspdf (npm) SEMVER:introduced=0,fixed=4.0.0.

**Is there a fix for CVE-2025-68428?** Yes. jspdf (npm): upgrade to 4.0.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-68428 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-68428?** Check whether you run jspdf (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- jspdf (npm): upgrade to 4.0.0 or later

  ```sh
  npm install jspdf@4.0.0
  ```


## Technical details

A path traversal vulnerability exists in the Node.js builds of jsPDF (dist/jspdf.node.js and dist/jspdf.node.min.js) due to insufficient sanitization of the first argument in the loadFile method. This flaw also extends to the addImage, html, and addFont methods. An attacker who can influence the file path passed to these methods can retrieve arbitrary files from the local file system where the Node process is running. The contents of these files are then embedded verbatim into the resulting PDF document. The vulnerability is resolved in version 4.0.0, which implements default restrictions on file system access. Users can also mitigate this by using Node.js's native --permission flags or manually sanitizing input paths.

## Affected products

- parallax jsPDF < 4.0.0

## Identifiers

- CVE-2025-68428
- GHSA-f8cm-6447-x5h2

## Timeline

- 2025-12-18: patched: Fix committed to repository
- 2026-01-03: advisory: GitHub Security Advisory published
- 2026-01-05: disclosed: CVE published to NVD

## References

- [https://github.com/parallax/jsPDF/commit/a688c8f479929b24a6543b1fa2d6364abb03066d](https://github.com/parallax/jsPDF/commit/a688c8f479929b24a6543b1fa2d6364abb03066d)
- [https://github.com/parallax/jsPDF/releases/tag/v4.0.0](https://github.com/parallax/jsPDF/releases/tag/v4.0.0)
- [https://github.com/parallax/jsPDF/security/advisories/GHSA-f8cm-6447-x5h2](https://github.com/parallax/jsPDF/security/advisories/GHSA-f8cm-6447-x5h2)
- [https://access.redhat.com/errata/RHSA-2026:1517](https://access.redhat.com/errata/RHSA-2026:1517)
- [https://access.redhat.com/errata/RHSA-2026:2350](https://access.redhat.com/errata/RHSA-2026:2350)
- [https://access.redhat.com/errata/RHSA-2026:2568](https://access.redhat.com/errata/RHSA-2026:2568)
- [https://access.redhat.com/security/cve/CVE-2025-68428](https://access.redhat.com/security/cve/CVE-2025-68428)

## Related threats

- [parallax jsPDF XSS in output function options](https://junglewise.ai/threats/cve-2026-31938-parallax-jspdf-xss-in-output-function-options)
- [parallax jsPDF PDF object injection in createAnnotation](https://junglewise.ai/threats/cve-2026-31898-parallax-jspdf-pdf-object-injection-in-createannotation)
- [parallax jsPDF PDF injection in Acroform module](https://junglewise.ai/threats/cve-2026-25940-parallax-jspdf-pdf-injection-in-acroform-module)
- [parallax jsPDF PDF object injection in addJS method](https://junglewise.ai/threats/cve-2026-25755-parallax-jspdf-pdf-object-injection-in-addjs-method)
- [parallax jsPDF denial of service in addImage method](https://junglewise.ai/threats/cve-2026-25535-parallax-jspdf-denial-of-service-in-addimage-method)
