CVE-2026-25755
Published:February 19, 2026
Updated:April 20, 2026
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the "addJS" method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in jspdf@4.2.0. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the "addJS" method.
Affected Packages
https://github.com/parallax/jsPDF.git (GITHUB):
Affected version(s) >=v0.9.0 <v4.2.0Fix Suggestion:
Update to version v4.2.0jspdf (NPM):
Affected version(s) >=1.0.272 <4.2.0Fix Suggestion:
Update to version 4.2.0Related Resources (6)
Do you need more information?
Contact UsCVSS v4
Base Score:
8.6
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
PASSIVE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
8.1
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Weakness Type (CWE)
EPSS
Base Score:
0.02