CVE-2025-68428 jsPDF has Local File Inclusion/Path Traversal vulnerability
Attackers can read arbitrary local files via path traversal in jsPDF's Node.js build, exposing sensitive data in generated PDFs.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-68428?
CVE-2025-68428 is a critical path traversal vulnerability in parallax jsPDF, published on 5 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.0.0, user control of the first argument of the loadFile method in the node.js build allows local file inclusion/path traversal. If given the possibility to pass unsanitized paths to the loadFile method, a user can retrieve file contents of arbitrary files in the local file system the node process is running in. The file contents are included verbatim in the generated PDFs. Other affected methods are `addImage`, `html`, and `addFont`. Only the node.js builds of the library are affected, namely the `dist/jspdf.node.js` and `dist/jspdf.node.min.js` files. The vulnerability has been fixed in [email protected]. This version restricts file system access per default. This semver-major update does not introduce other breaking changes. Some workarounds areavailable. With recent node versions, jsPDF recommends using the `--permission` flag in production. The feature was introduced experimentally in v20.0.0 and is stable since v22.13.0/v23.5.0/v24.0.0. For older node versions, sanitize user-provided paths before passing them to jsPDF.
Which versions are affected by CVE-2025-68428?
2 open source packages ship an affected version, including jspdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jspdf npm | All versions | 4.0.0 |
jspdf npm | All versions | 4.0.0 |
Products include Parall Jspdf.
How do I fix CVE-2025-68428?
Upgrade jspdf to 4.0.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-68428 being exploited?
There is no known exploitation of CVE-2025-68428 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in parallax jsPDF
- CVE-2026-31938 jsPDF has HTML Injection in New Window paths
- CVE-2026-25535 jsPDF Affected by Client-Side/Server-Side Denial of Service via Malicious GIF Dimensions
- CVE-2026-24133 jsPDF Affected by Denial of Service (DoS) via Unvalidated BMP Dimensions in BMPDecoder
- CVE-2025-57810 jsPDF Parsing of Corrupt PNGs Leads to Potential Denial of Service (DoS)
- CVE-2025-29907 jsPDF Bypass Regular Expression Denial of Service (ReDoS)
Sources
Also known as CLSA-2026-1773447390, CLSA-2026-1773620208, GHSA-f8cm-6447-x5h2, ROOT-APP-NPM-CVE-2025-68428.