CVE-2025-68428 jsPDF has Local File Inclusion/Path Traversal vulnerability

Critical 9.2 Published Updated

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.

Weakness: CWE-22, CWE-73, CWE-35

Which versions are affected by CVE-2025-68428?

2 open source packages ship an affected version, including jspdf. It affects 1 product.

PackageAffectedFixed in
jspdf npmAll versions4.0.0
jspdf npmAll versions4.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.

Sources

Also known as CLSA-2026-1773447390, CLSA-2026-1773620208, GHSA-f8cm-6447-x5h2, ROOT-APP-NPM-CVE-2025-68428.

Is CVE-2025-68428 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free