Skip to main content

Jspdf CVE-2025-68428

CRITICAL
Path Traversal: '.../...//' (CWE-35)
2026-01-05 security-advisories@github.com GHSA-f8cm-6447-x5h2
9.2
CVSS 4.0 · Vendor: github
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path traversal prevention
Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv4 – Jun 30, 2026

Local file inclusion and path traversal in the Node.js builds of jsPDF (dist/jspdf.node.js and dist/jspdf.node.min.js) prior to version 4.0.0 lets an attacker who controls the path argument passed to loadFile, addImage, html, or addFont read arbitrary files from the host filesystem, with the file contents embedded verbatim into the generated PDF. Applications that forward unsanitized user input into these methods leak secrets such as /etc/passwd, configuration files, or private keys to anyone who can request a PDF. No public exploit identified at time of analysis; EPSS risk is very low (0.02%, 6th percentile) and the issue is not in CISA KEV.

Earlier versions of this analysis (3)
v3 Jun 30, 2026 - 04:11 cvss changed CVSS 9.2

Local file inclusion / path traversal in the Node.js builds of jsPDF (dist/jspdf.node.js and dist/jspdf.node.min.js) before version 4.0.0 lets an attacker who controls the first argument of loadFile (or addImage, html, addFont) read arbitrary files from the host filesystem, with the file contents embedded verbatim into the generated PDF and thus exfiltrated. Only server-side Node deployments that pass unsanitized, user-controlled paths to these methods are affected; browser builds are not. There is no public exploit identified and EPSS is very low (0.02%), but the issue is fixed in jsPDF 4.0.0 and tracked in Red Hat advisories.

v2 Jun 30, 2026 - 04:11 cvss changed CVSS 9.2

Arbitrary local file disclosure in the jsPDF Node.js builds (parallax/jsPDF prior to 4.0.0) lets an attacker supplying unsanitized paths to loadFile (or addImage, html, addFont) read any file readable by the Node process via path traversal, with the stolen contents embedded verbatim in the generated PDF. Only the node distributions (dist/jspdf.node.js and dist/jspdf.node.min.js) are affected; fixed in jsPDF@4.0.0, which restricts filesystem access by default. No public exploit identified at time of analysis, and EPSS is very low at 0.02%, indicating limited observed exploitation interest.

v1 Mar 12, 2026 - 21:54 CVSS 7.5

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. [CVSS 7.5 HIGH]

Affected Packages

npm jspdf fix: 4.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Know when Jspdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
vuln.today AI 8.6 HIGH

Network-reachable via the embedding app with no auth or interaction (AV:N/PR:N/UI:N); arbitrary file read crosses jsPDF's scope to the host (S:C, C:H), with no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Red Hat 8.6 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

7
Analysis Updated
Jun 30, 2026 - 04:13 vuln.today
v4 - CVSS changed
Analysis Updated
Jun 30, 2026 - 04:11 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 30, 2026 - 04:11 vuln.today
v2 - CVSS changed
Severity Changed
Jun 30, 2026 - 03:23 NVD
HIGH CRITICAL
CVSS changed
Jun 30, 2026 - 03:23 NVD
7.5 (HIGH) 9.2 (CRITICAL)
Patch released
Jan 16, 2026 - 18:34 nvd
Patch available
CVE Published
Jan 05, 2026 - 22:15 nvd
HIGH 7.5

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

jsPDF Node.js library versions prior to 4.0.0 contain a critical path traversal vulnerability allowing server-side file disclosure when user input reaches PDF generation methods. Organizations deploying jsPDF-based services risk exposure of sensitive configuration files, private keys, and system credentials embedded in generated documents. Immediate patching required to prevent credential compromise and unauthorized system access.

Recommended Action

Within 24 hours: Audit all code repositories and dependencies for jsPDF usage prior to version 4.0.0; identify applications with user-influenced PDF generation. Within 7 days: Upgrade jsPDF to version 4.0.0 across all environments (development, staging, production); redeploy affected services. Within 30 days: Review PDF generation logs for exploitation attempts; rotate any exposed credentials identified; implement input validation standards for all file path parameters passed to jsPDF methods (loadFile, addImage, html, addFont).

Business Impact: Severe
Compensating Controls

Apply vendor patch (jsPDF version 4.0.0). Interim mitigation: Implement strict whitelist-based path validation for all file path inputs; restrict jsPDF process permissions to only required directories; temporarily disable user-customizable PDF generation until patch is deployed.

Threat Intelligence Overview

EPSS Score
0.0%
Top 94% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Affected Products (CPE)CVE.org

cpe:2.3:a:parall:jspdf:*:*:*:*:*:node.js:*:*

More in Jspdf

View all
CVE-2026-25755 HIGH POC
8.8 Feb 19

PDF object injection in the jsPDF JavaScript library (npm package 'jspdf', versions prior to 4.2.0) lets an attacker who

CVE-2026-25535 HIGH POC
8.7 Feb 19

Denial of service in jsPDF (npm package, all versions prior to 4.2.0) lets an attacker who can supply image input to the

CVE-2026-24737 HIGH POC
8.1 Feb 02

PDF generation in jsPDF prior to version 4.1.0 allows injection of arbitrary PDF objects through unsanitized input passe

CVE-2026-24133 MEDIUM POC
6.5 Feb 02

Denial of service in jsPDF prior to version 4.1.0 occurs when malicious BMP files with oversized dimension headers are p

CVE-2020-7691 MEDIUM POC
6.1 Jul 06

In all versions of the package jspdf, it is possible to use <<script>script> in order to go over the filtering regex. Ra

CVE-2020-7690 MEDIUM POC
6.1 Jul 06

All affected versions <2.0.0 of package jspdf are vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS

CVE-2026-24043 MEDIUM POC
5.4 Feb 02

Jspdf versions up to 4.1.0 contains a vulnerability that allows attackers to inject arbitrary XML (CVSS 5.4).

CVE-2026-24040 MEDIUM POC
4.8 Feb 02

jsPDF versions prior to 4.1.0 contain a race condition in the addJS method where a shared module-scoped variable is over

CVE-2026-25940 HIGH
8.1 Feb 19

jsPDF versions prior to 4.2.0 allow attackers to inject arbitrary PDF objects including malicious JavaScript through uns

CVE-2021-23353 HIGH
7.5 Mar 09

This affects the package jspdf before 2.3.1. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,

CVE-2025-57810 HIGH POC
8.7 Aug 26

jsPDF is a library to generate PDFs in JavaScript. Rated high severity (CVSS 8.7), this vulnerability is remotely exploi

CVE-2025-29907 HIGH POC
8.7 Mar 18

jsPDF is a library to generate PDFs in JavaScript. Rated high severity (CVSS 8.7), this vulnerability is remotely exploi

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy