CVE-2025-68428: jsPDF has Local File Inclusion/Path Traversal vulnerability
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 jsPDF@4.0.0. 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.
Security readout for executives and security teams
Plain-English summary
CVE-2025-68428 is a critical file disclosure issue in jsPDF before 4.0.0 when used in Node.js. If an application lets users influence file paths passed into jsPDF, generated PDFs may include arbitrary local file contents from the server. This can expose secrets, configuration, or application data.
Executive priority
Prioritize remediation for internet-facing or multi-tenant PDF generation services. The main business risk is unintended disclosure of sensitive server files through generated PDFs. Treat as urgent where user-supplied content feeds PDF creation.
Technical view
In Node.js builds of jsPDF before 4.0.0, user-controlled paths passed to loadFile can cause local file inclusion/path traversal. Related affected methods include addImage, html, and addFont. The issue affects dist/jspdf.node.js and dist/jspdf.node.min.js. jsPDF 4.0.0 changes default filesystem access behavior to restrict access.
Likely exposure
Exposure is most likely in server-side PDF generation services using jsPDF before 4.0.0 where user input controls images, fonts, HTML, or file paths. Browser-only use is not identified as affected in the provided sources.
Exploitation context
The CVSS 4.0 score is 9.2 with network attack vector, low complexity, no privileges, and no user interaction. Sources do not state active exploitation, and KEV status is false. Practical impact depends on whether untrusted users can influence jsPDF file-loading inputs.
Researcher notes
The public advisory names CWE-35 and CWE-73 and limits scope to Node.js builds. The fix is in jsPDF 4.0.0, with Node permission flags and path sanitization noted as workarounds. No provided source confirms exploitation in the wild.
Mitigation direction
Upgrade jsPDF to version 4.0.0 or later.
Confirm applications are not using vulnerable Node.js distribution files.
Use Node.js --permission in production where supported.
Sanitize user-provided paths before passing them to jsPDF.
Review vendor advisories and Red Hat errata for packaged dependencies.
Validation and detection
Inventory projects and containers for jsPDF versions below 4.0.0.
Identify server-side PDF generation paths using jsPDF Node builds.
Review use of loadFile, addImage, html, and addFont.
Check whether user input can influence file paths.
Verify deployed packages include jsPDF 4.0.0 or vendor-fixed builds.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-35: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-35 · source CWE mapping
Path Traversal: '.../...//'
Path Traversal: '.../...//' represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
External Control of File Name or Path represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.