Every CVE Search/ Get API key

CVE-2025-68428

jsPDF has Local File Inclusion/Path Traversal vulnerability

9.2 CriticalPublic exploitFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

2.18%Up 2.1 points since Jan 6, 2026
90%50%10%1%

What each source reports

CVE List Score used 9.2

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 [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.

Record
CVE-2025-68428
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-35, CWE-73, CWE-73
Updated
2026-11-02
EUVDEUVD-2026-0847 9.2

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.

Record
EUVD-2026-0847
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-f8cm-6447-x5h2 9.2

jsPDF has Local File Inclusion/Path Traversal vulnerability

Impact

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, addFont.

Only the node.js builds of the library are affected, namely the dist/jspdf.node.js and dist/jspdf.node.min.js files.

Example attack vector:

import { jsPDF } from "./dist/jspdf.node.js";

const doc = new jsPDF();

doc.addImage("./secret.txt", "JPEG", 0, 0, 10, 10);
doc.save("test.pdf"); // the generated PDF will contain the "secret.txt" file

Patches

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.

Workarounds

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. See the node documentation for details.

For older node versions, sanitize user-provided paths before passing them to jsPDF.

Credits

Researcher: kilkat (Kwangwoon Kim)

Record
GHSA-f8cm-6447-x5h2
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Weakness
CWE-22, CWE-35, CWE-73
Updated
2026-11-02
NVD 9.2

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.

Record
CVE-2025-68428
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 3.1
8.6 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-35, CWE-73, CWE-22
Updated
2026-11-02
OSV 9.2

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 [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.

Record
CVE-2025-68428
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Weakness
CWE-35, CWE-73
Updated
2026-11-02
OSVGHSA-f8cm-6447-x5h2 9.2

jsPDF has Local File Inclusion/Path Traversal vulnerability

Impact

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, addFont.

Only the node.js builds of the library are affected, namely the dist/jspdf.node.js and dist/jspdf.node.min.js files.

Example attack vector:

import { jsPDF } from "./dist/jspdf.node.js";

const doc = new jsPDF();

doc.addImage("./secret.txt", "JPEG", 0, 0, 10, 10);
doc.save("test.pdf"); // the generated PDF will contain the "secret.txt" file

Patches

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.

Workarounds

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. See the node documentation for details.

For older node versions, sanitize user-provided paths before passing them to jsPDF.

Credits

Researcher: kilkat (Kwangwoon Kim)

Record
GHSA-f8cm-6447-x5h2
CVSS 4.0
9.2 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Weakness
CWE-22, CWE-35, CWE-73
Updated
2026-11-02
Show 5 moreShow less
OSVCLSA-2026-1773447390 No score

TuxCare security update for jspdf (1 CVE)

TuxCare rebuilt jspdf to address 1 CVE. Fixed in 3.0.4-tuxcare.2.

Record
CLSA-2026-1773447390
Updated
2026-11-02
OSVCLSA-2026-1773620208 No score

TuxCare security update for jspdf (1 CVE)

TuxCare rebuilt jspdf to address 1 CVE. Fixed in 2.5.2-tuxcare.4.

Record
CLSA-2026-1773620208
Updated
2026-11-02
OSVCLSA-2026-1780534264 No score

TuxCare security update for jspdf (12 CVEs)

TuxCare rebuilt jspdf to address 12 CVEs. Fixed in 2.5.1-tuxcare.1.

Record
CLSA-2026-1780534264
Updated
2026-11-02
OSVCLSA-2026-1780966318 No score

TuxCare security update for jspdf (6 CVEs)

TuxCare rebuilt jspdf to address 6 CVEs. Fixed in 1.4.1-tuxcare.1.

Record
CLSA-2026-1780966318
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2025-68428 No score

CVE-2025-68428 in jspdf - Patched by Root

Root has patched CVE-2025-68428 in the jspdf package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2025-68428
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
jspdf
npm
through 3.0.4
4.0.0
jspdf
TuxCare:npm
3.0.4-tuxcare.0 up to 3.0.4-tuxcare.2, plus listed versions
3.0.43.0.4-tuxcare.1
3.0.4-tuxcare.2
jspdf
TuxCare:npm
2.5.2-tuxcare.0 up to 2.5.2-tuxcare.4, plus listed versions
2.5.22.5.2-tuxcare.12.5.2-tuxcare.22.5.2-tuxcare.3
2.5.2-tuxcare.4
jspdf
TuxCare:npm
From an advisory covering 12 CVEs
2.5.1-tuxcare.0 up to 2.5.1-tuxcare.1, plus listed versions
2.5.1
2.5.1-tuxcare.1
jspdf
TuxCare:npm
From an advisory covering 6 CVEs
1.4.1-tuxcare.0 up to 1.4.1-tuxcare.1, plus listed versions
1.4.1
1.4.1-tuxcare.1
jspdf
npm
before 4.0.0
4.0.0
jspdf
Root:npm
before 2.5.2-aikido.1
2.5.2-aikido.12.5.2+aikido.2
@rootio/jspdf
Root:npm
before 2.5.2-root.io.1
2.5.2-root.io.12.5.2+aikido.2

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHub12nio/CVE-2025-68428_PoC2026-01-08
PoC in GitHubNurjaman2004/jsPDF-Bulk-Detector-CVE-2025-68428-2026-01-14

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-68428 is a critical vulnerability (CVSS 9.2) in Parall Jspdf, published January 5, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 2.18%, the 82nd percentile. Fixed in jspdf 4.0.0.

References

Show 7 moreShow less
MoveEnter Open