CVE-2025-68428: CWE-35: Path Traversal: '.../...//' in parallax jsPDF
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.
AI Analysis
Technical Summary
jsPDF versions prior to 4.0.0 contain a path traversal vulnerability in the node.js build. User input controlling the first argument of the loadFile method can lead to local file inclusion, allowing an attacker to read arbitrary files from the local file system. The file contents are included verbatim in generated PDFs. This affects only the node.js builds (dist/jspdf.node.js and dist/jspdf.node.min.js) and related methods addImage, html, and addFont. The issue is resolved in version 4.0.0 by restricting file system access by default. The vulnerability is tracked as CVE-2025-68428 with a CVSS 4.0 base score of 9.2 (critical). Vendor advisories confirm the fix and recommend upgrading to 4.0.0 or later. Some mitigations like using the node --permission flag are suggested for production environments.
Potential Impact
An attacker able to pass unsanitized paths to the loadFile method in the vulnerable jsPDF node.js builds can read arbitrary files on the local file system accessible to the node process. This compromises confidentiality by exposing sensitive local files. The vulnerability does not require privileges or user interaction and can be exploited remotely if the application exposes this functionality. The vulnerability does not impact integrity or availability directly but could lead to information disclosure. No known active exploits have been reported.
Mitigation Recommendations
A fixed version of jsPDF is available: upgrade to version 4.0.0 or later, which restricts file system access by default. For environments where upgrading is not immediately possible, mitigations include sanitizing input paths passed to loadFile and related methods, and using recent Node.js versions with the --permission flag to restrict file system access. Vendor advisories note that no other official mitigations meet their criteria, so upgrading is strongly recommended.
CVE-2025-68428: CWE-35: Path Traversal: '.../...//' in parallax jsPDF
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.
CVSS v4.0
Score 9.2critical
Affected software
parallax
jsPDF
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
jsPDF versions prior to 4.0.0 contain a path traversal vulnerability in the node.js build. User input controlling the first argument of the loadFile method can lead to local file inclusion, allowing an attacker to read arbitrary files from the local file system. The file contents are included verbatim in generated PDFs. This affects only the node.js builds (dist/jspdf.node.js and dist/jspdf.node.min.js) and related methods addImage, html, and addFont. The issue is resolved in version 4.0.0 by restricting file system access by default. The vulnerability is tracked as CVE-2025-68428 with a CVSS 4.0 base score of 9.2 (critical). Vendor advisories confirm the fix and recommend upgrading to 4.0.0 or later. Some mitigations like using the node --permission flag are suggested for production environments.
Potential Impact
An attacker able to pass unsanitized paths to the loadFile method in the vulnerable jsPDF node.js builds can read arbitrary files on the local file system accessible to the node process. This compromises confidentiality by exposing sensitive local files. The vulnerability does not require privileges or user interaction and can be exploited remotely if the application exposes this functionality. The vulnerability does not impact integrity or availability directly but could lead to information disclosure. No known active exploits have been reported.
Mitigation Recommendations
A fixed version of jsPDF is available: upgrade to version 4.0.0 or later, which restricts file system access by default. For environments where upgrading is not immediately possible, mitigations include sanitizing input paths passed to loadFile and related methods, and using recent Node.js versions with the --permission flag to restrict file system access. Vendor advisories note that no other official mitigations meet their criteria, so upgrading is strongly recommended.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-12-17T15:29:39.378Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2025-68428","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:1517","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2350","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:2568","vendor":"Red Hat"}]
Threat ID: 695c32b23839e4417593972b
Added to database: 01/05/2026, 21:52:50 UTC
Last enriched: 08/17/2026, 13:11:42 UTC
Last updated: 09/10/2026, 19:46:22 UTC
Views: 595
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.