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
A malicious GIF can declare enormous dimensions, causing vulnerable jsPDF applications to allocate excessive memory and become unavailable. The issue can affect PDF generation in browsers or servers when users control image data or URLs. It does not indicate data theft or modification.
Executive priority
Treat as urgent where unauthenticated users can submit images or URLs for PDF generation because a single request may exhaust service memory. Upgrade promptly and validate input paths. Where inputs are exclusively trusted, immediate risk is lower, but remediation should remain scheduled.
Technical view
jsPDF versions before 4.2.0 insufficiently handle attacker-controlled GIF dimensions passed through addImage or html. Excessive width or height values trigger uncontrolled memory allocation, potentially causing out-of-memory termination and denial of service. CVSS 4.0 scores it 8.7, with network access, no privileges, and no user interaction required.
Likely exposure
Exposure exists where jsPDF before 4.2.0 processes unsanitized, user-influenced image data or URLs through addImage or html. Internet-facing PDF-generation services are the clearest concern. Applications processing only trusted, fixed images have lower practical exposure, although the vulnerable dependency should still be upgraded.
Exploitation context
The supplied sources describe a remotely triggerable availability flaw, but provide no evidence of active exploitation, and the CVE is not listed as KEV. Exploitation depends on an application exposing a path for untrusted GIF data or URLs to reach affected jsPDF methods.
Researcher notes
The reported weakness is resource exhaustion through excessive allocation, mapped to CWE-400 and CWE-770. Large GIF width or height header values are the trigger condition. The supplied CVSS vector indicates high availability impact without confidentiality or integrity impact. Evidence establishes the affected methods and fixed release, but not exploitation in the wild.
Mitigation direction
Upgrade jsPDF to version 4.2.0 or later.
Block unsanitized user-controlled image data or URLs from reaching addImage.
Apply equivalent image sanitation before content reaches the html method.
Prioritize internet-facing PDF-generation services and server-side deployments.
Validation and detection
Inventory direct and transitive jsPDF versions in browser bundles and server deployments.
Trace addImage and html call paths for user-controlled image data or URLs.
Confirm production artifacts resolve jsPDF 4.2.0 or later.
Verify sanitation rejects GIFs with unreasonable declared dimensions before jsPDF processing.
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.