CVE-2025-68428
Local File Inclusion in jsPDF Node.js Build Allows Arbitrary File Access
Publication date: 2026-01-05
Last updated on: 2026-01-05
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| parallax/jspdf | 4.0.0 | * |
| parallax/jspdf | * | to 4.0.0 (exc) |
| parallax/jspdf | 20.0.0 | * |
| parallax/jspdf | 22.13.0 | * |
| parallax/jspdf | 23.5.0 | * |
| parallax/jspdf | 24.0.0 | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-73 | The product allows user input to control or influence paths or file names that are used in filesystem operations. |
| CWE-35 | The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '.../...//' (doubled triple dot slash) sequences that can resolve to a location that is outside of that directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability in jsPDF prior to version 4.0.0 allows an attacker to perform local file inclusion/path traversal by controlling the first argument of the loadFile method in the node.js build. If unsanitized paths are passed, an attacker can retrieve contents of arbitrary files from the local file system where the node process runs. These file contents are then included verbatim in the generated PDFs. Other affected methods include addImage, html, and addFont. The issue is fixed in jsPDF version 4.0.0, which restricts file system access by default.
How can this vulnerability impact me? :
This vulnerability can lead to unauthorized disclosure of sensitive local files by including their contents in generated PDFs. An attacker exploiting this could access confidential information stored on the server running the node.js process, potentially leading to data breaches or exposure of sensitive data.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, immediately upgrade jsPDF to version 4.0.0 or later, as this version restricts file system access by default. Additionally, if you are using recent Node.js versions, use the '--permission' flag in production to limit file system access. For older Node.js versions, ensure that all user-provided paths passed to jsPDF methods like loadFile, addImage, html, and addFont are properly sanitized to prevent local file inclusion or path traversal.