Skip to content
Threat Feed
critical advisory

jsPDF: Path traversal and local file inclusion (CVE-2025-68428)

A critical path traversal and local file inclusion vulnerability in jsPDF versions prior to 4.0.0 allows unauthenticated attackers to read arbitrary files in Node.js server-side environments.

CVE search metadata

CVE search record: CVE-2025-68428. Severity: high. CVSS: 7.5. EPSS: 2.18%. KEV: no. Product: jsPDF (< 4.0.0). Brief: jsPDF: Path traversal and local file inclusion (CVE-2025-68428). Brief link: https://feed.craftedsignal.io/briefs/2026-10-jspdf-lfi/

Triage facts

Revision 1
Applicability
jsPDF (< 4.0.0)
Evidence
Unknown
Severity
Critical
Action
Immediate escalation
Sources
3 public sources
Freshness
Revision 1Oct 30, 18:59 UTC
Vulnerabilities
1 CVE
Source quality
B2Very likely

CVE-2025-68428 is a critical vulnerability in the jsPDF library (versions < 4.0.0) affecting Node.js implementations. The vulnerability arises when user-controlled input is passed to server-side file-loading functions, enabling path traversal and unauthorized local file inclusion (LFI). Attackers can leverage this to read sensitive files from the server's filesystem.

Impact

Successful exploitation allows unauthenticated attackers to read arbitrary files on the server hosting the affected Node.js application, potentially leading to the disclosure of sensitive configuration files, source code, or credentials.

Recommendation

  • Upgrade jsPDF to version 4.0.0 or later immediately.
  • Audit server-side code to identify instances where user-supplied input is passed to jsPDF functions like 'loadFile', 'addImage', 'addFont', or 'html()'.
  • Implement strict allowlisting for file paths and parameters used in PDF generation endpoints.
  • Review Node.js filesystem access permissions and ensure the process runs with the principle of least privilege.
  • Use the asset discovery phase to identify where the library is in use across the environment to prioritize patching.

Immediate actions

Inventory all applications utilizing jsPDF and identify those running on Node.js.

AppSec 24h

Threat Hunt

Identify server-side endpoints processing user-controlled file paths via jsPDF library calls.

T1190 high high confidence hunt now

Data: Application source code analysis, Web server access logs

Mitigations

Upgrade jsPDF to version 4.0.0 or later.

immediate IT Operations

CVE-2025-68428