CVE-2026-25755: 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.
Security readout for executives and security teams
Plain-English summary
This affects applications that generate PDFs with jsPDF before 4.2.0 and pass user-influenced content into addJS. A malicious input can change the generated PDF so harm occurs when a recipient opens it. The issue is critical because confidentiality, integrity, and availability impacts are all rated high, but user interaction is required.
Executive priority
Treat as urgent for products or workflows generating user-facing PDFs from customer-controlled data. Prioritize upgrade and exposure review before broad redistribution of generated PDFs.
Technical view
The addJS method did not safely encode input embedded in PDF JavaScript strings. Before jsPDF 4.2.0, attacker-controlled arguments could escape string delimiters and inject arbitrary PDF objects, changing document structure or triggering malicious PDF behavior when opened. The published CVSS 3.1 score is 9.6 with network attack vector, low complexity, no privileges, and required user interaction.
Likely exposure
Primary exposure is any application using parallax jsPDF versions below 4.2.0 where addJS receives user-controlled or indirectly user-controlled data.
Exploitation context
The source bundle does not state active exploitation, and KEV is false. Practical abuse depends on controlling addJS input and convincing a user to open the generated PDF.
Researcher notes
Evidence supports a PDF object injection flaw in addJS fixed by commit and release 4.2.0. The bundle identifies CWE-116 and CWE-94. Do not assume broader jsPDF API exposure without local code review.
Mitigation direction
Upgrade jspdf to version 4.2.0 or later.
If upgrade is blocked, escape parentheses before passing user-provided JavaScript to addJS.
Avoid passing untrusted or user-authored content into addJS.
Review downstream vendor advisories for packaged jsPDF copies.
Regenerate affected PDFs after patching where document trust matters.
Validation and detection
Inspect package manifests, lockfiles, and SBOMs for jspdf below 4.2.0.
Review PDF-generation paths for addJS calls using request, form, profile, or template data.
Confirm deployed builds actually include the patched jsPDF version.
Add regression tests for addJS handling of parentheses in user-controlled input.
Check whether any distributed PDFs were generated from untrusted inputs before remediation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-116: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
10Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.