CVE-2026-25535: jsPDF Affected by Client-Side/Server-Side Denial of Service via Malicious GIF Dimensions
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the first argument of the `addImage` method results in denial of service. If given the possibility to pass unsanitized image data or URLs to the `addImage` method, a user can provide a harmful GIF file that results in out of memory errors and denial of service. Harmful GIF files have large width and/or height entries in their headers, which lead to excessive memory allocation. Other affected methods are: `html`. The vulnerability has been fixed in jsPDF 4.2.0. As a workaround, sanitize image data or URLs before passing it to the addImage method or one of the other affected methods.
Security readout for executives and security teams
Plain-English summary
jsPDF versions before 4.2.0 can be crashed when they process a malicious GIF with very large dimensions in its header. The main business risk is denial of service in applications that generate PDFs from user-supplied images or image URLs.
Executive priority
Prioritize remediation for internet-facing or customer-facing PDF generation. Internal-only uses with trusted images are lower urgency, but still need upgrade planning because the impact can be full availability loss for the affected process.
Technical view
The vulnerability affects jsPDF addImage and html paths when the first addImage argument, image data, or image URL is attacker-controlled. Malformed GIF dimensions trigger excessive memory allocation, causing out-of-memory denial of service. The issue is fixed in jsPDF 4.2.0.
Likely exposure
Applications using jsPDF before 4.2.0 and passing user-controlled image data or URLs into addImage or html are exposed. Both browser-based PDF generation and server-side workflows may be affected if untrusted GIFs reach those methods.
Exploitation context
The bundle does not show CISA KEV listing or confirmed exploitation in the wild. Exploitation requires a target workflow to accept or fetch attacker-controlled GIF data and process it with affected jsPDF methods, causing availability impact through excessive memory allocation.
Researcher notes
Focus assessment on data flow into addImage and html, especially uploaded images, pasted data URIs, and fetched URLs. The root issue is resource consumption from oversized GIF width or height metadata, mapped to CWE-400 and CWE-770.
Mitigation direction
Upgrade jsPDF to version 4.2.0 or later.
Sanitize image data and image URLs before passing them to jsPDF.
Validate image type and dimensions before PDF generation.
Restrict untrusted remote image fetching in PDF workflows.
Review vendor and distribution advisories for packaged dependency updates.
Validation and detection
Inventory direct and transitive jsPDF versions across applications.
Search for addImage and html usage handling user-controlled images.
Confirm deployed builds resolve to jsPDF 4.2.0 or vendor-fixed packages.
Verify image validation rejects abnormal dimensions before jsPDF processing.
Review PDF generation logs for memory exhaustion or repeated crashes.
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 · low confidence lookup
CWE-400: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. 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.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. 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.
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-400 · source CWE mapping
Uncontrolled Resource Consumption
Uncontrolled Resource Consumption represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Allocation of Resources Without Limits or Throttling
Allocation of Resources Without Limits or Throttling represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.