Parallax jsPDF
jsPDF has PDF Object Injection via Unsanitized Input in addJS Method
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- < 4.2.0
Fixed in 4.2.0
Mitigation
Upgrade jsPDF to 4.2.0 or later.
References
- Vendor advisory github.com/parallax/jsPDF/security/advisories/…
- Patch github.com/parallax/jsPDF/commit/56b46d45b0523…
- Release notes github.com/parallax/jsPDF/releases/tag/v4.2.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.1 informational
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| absholi7ly/jsPDF-Object-Injection | 24 Feb 2026 +4.7 d | 1 | Informational · write-up |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.