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
Applications using jsPDF before 4.2.0 may create dangerous PDFs when untrusted data reaches the addJS method. An attacker could alter the PDF’s internal structure or cause malicious actions when a recipient opens it. Risk depends on whether the application exposes that specific data path.
Executive priority
Treat internet-facing or multi-user PDF-generation systems using addJS with untrusted input as urgent. Patch promptly and prioritize data-flow confirmation. Systems that do not call addJS are lower priority, but dependency inventory is still necessary because the supplied severity reflects potentially broad impact.
Technical view
The addJS method failed to safely encode its argument within a PDF JavaScript string. Attacker-controlled input could escape the intended delimiter and inject arbitrary PDF objects. The issue is classified under improper output encoding and code injection, with CVSS 3.1 score 9.6. Version 4.2.0 contains the fix.
Likely exposure
Exposure is likely where jsPDF versions below 4.2.0 generate documents using addJS with user-controlled or externally sourced input. Merely having jsPDF installed does not establish exploitability; applications must confirm the vulnerable method and data flow are present.
Exploitation context
Exploitation is remotely initiable and low complexity according to the supplied CVSS vector, but requires a user to open the generated PDF. The bundle does not identify CISA KEV listing or provide evidence of active exploitation. Potential consequences include document manipulation and confidentiality, integrity, or availability impacts.
Researcher notes
The decisive exposure condition is attacker influence over the addJS argument in jsPDF before 4.2.0. Review direct and transitive dependency resolution plus shipped bundles, since manifests alone may not represent production. The supplied sources identify the fixing commit and release; no active-exploitation claim is supported.
Mitigation direction
Upgrade jsPDF to version 4.2.0 or later.
Rebuild and redeploy every application or service bundling the affected dependency.
If upgrading is delayed, escape parentheses in user-provided JavaScript before passing it to addJS.
Restrict untrusted input from reaching addJS until remediation is verified.
Validation and detection
Inventory direct, transitive, bundled, and client-side copies of jsPDF.
Confirm production artifacts resolve jsPDF to version 4.2.0 or later.
Search application code for addJS calls and trace each input source.
Verify untrusted data cannot reach addJS without the documented escaping.
Run controlled regression tests confirming generated PDFs remain structurally valid after 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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-116 · source CWE mapping
Improper Encoding or Escaping of Output
Improper Encoding or Escaping of Output represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Control of Generation of Code ('Code Injection')
Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.