Skip to main content

jsPDF CVE-2026-25535

HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-02-19 security-advisories@github.com GHSA-67pg-wm7f-q7fj
8.7
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app feeding user images to jsPDF
  2. Delivery
    Craft GIF with huge width/height header
  3. Exploit
    Submit image via upload or URL
  4. Execution
    addImage invokes omggif decoder
  5. Persist
    Oversized pixel buffer allocation
  6. Impact
    Out-of-memory crash, denial of service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application allows attacker influence over the first argument of jsPDF's addImage method (or the html method) - i.e., it passes unsanitized user-supplied image data or URLs into jsPDF rather than only trusted developer-controlled images. The malicious payload must be a GIF whose logical-screen/image-descriptor width and/or height fields are set large enough that width*height exceeds the decoder's allocation capacity (the fix threshold is 512M pixels). What LIMITS exploitation: it is harmless against deployments that render only trusted, fixed images; impact is confined to availability (process crash / OOM) with no data disclosure or code execution; and any input validation that bounds image dimensions or restricts image sources neutralizes it. CVSS reports PR:N/UI:N, so no authentication or victim interaction is inherently required beyond the application-level prerequisite of accepting external image input.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) scoring 8.7 reflects a pure availability impact (VA:H, VC:N/VI:N) - no confidentiality or integrity loss, which is consistent with a memory-exhaustion DoS. The high base score is driven by network reach and no privilege requirement, but real-world risk is gated by an application-level precondition the CVSS abstraction hides: the host application must actually pass attacker-controlled image data or URLs into addImage/html. Applications that only render trusted, developer-supplied images are not exposed. This tension is reflected in the signals: EPSS is very low (0.05%, 17th percentile) and the issue is NOT in CISA KEV, indicating no observed mass exploitation, even though a public POC exists. Net assessment: a genuine and easily-triggered DoS for the subset of deployments that feed untrusted images to jsPDF (e.g., user-uploaded avatars rendered into PDFs), but lower urgency than the 8.7 suggests for the broader install base. No code-execution or data-exposure risk.

Exploit ScenarioDerived

An application lets users upload a profile picture that is later embedded into a generated PDF via jsPDF's addImage. An attacker uploads a tiny crafted GIF whose header declares a width/height of tens of thousands of pixels each; when the server (or victim browser) renders the PDF, omggif tries to allocate a multi-gigabyte pixel buffer, exhausts memory, and crashes the process. A public POC is available at https://github.com/ZeroXJacks/CVEs/blob/main/2026/CVE-2026-25535.md, and the low attack complexity (AC:L) means no special timing or conditions are needed.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv5 – Jun 30, 2026

Denial of service in jsPDF (npm package, all versions prior to 4.2.0) lets an attacker who can supply image input to the addImage or html methods crash the host process. A malicious GIF whose header declares enormous width/height values forces the bundled omggif decoder to attempt allocation of an oversized pixel buffer, producing out-of-memory errors. Publicly available exploit code exists (no active exploitation reported in CISA KEV), and the EPSS probability is low at 0.05%.

Earlier versions of this analysis (4)
v4 Jun 30, 2026 - 05:41 cvss changed CVSS 8.7

Denial of service in jsPDF, a widely used JavaScript client/server-side PDF generation library, affects all versions prior to 4.2.0 when an application passes attacker-controlled image data or URLs to the addImage (or html) method. A maliciously crafted GIF with oversized width/height header values forces excessive memory allocation, triggering out-of-memory errors that crash the Node.js process or browser tab. Publicly available exploit code exists and a vendor patch is released, but EPSS is very low (0.05%, 17th percentile) and the issue is not on CISA KEV.

v3 Jun 30, 2026 - 05:40 cvss changed CVSS 8.7

Denial of service in the jsPDF JavaScript PDF-generation library (versions prior to 4.2.0) lets an attacker who controls the first argument of the addImage method - or the input to the html method - supply a crafted GIF whose header declares enormous width/height values, forcing excessive memory allocation, out-of-memory errors, and process crash. Publicly available exploit code exists, though EPSS is very low (0.05%, 17th percentile) and it is not listed in CISA KEV, indicating no public exploit identified at time of analysis for active campaigns. Impact is availability-only; there is no confidentiality or integrity loss.

v2 Jun 30, 2026 - 05:39 cvss changed CVSS 8.7

Denial of service in jsPDF before 4.2.0 lets attackers trigger out-of-memory crashes by feeding a malicious GIF to the addImage method (and the html method, which calls it internally). The GIF's header declares enormous width and/or height values, forcing jsPDF to attempt excessive memory allocation that exhausts the host process. Publicly available exploit code exists, though EPSS rates real-world exploitation probability very low (0.05%, 17th percentile), and the issue is not on CISA KEV.

v1 Mar 12, 2026 - 22:03 CVSS 7.5

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. [CVSS 7.5 HIGH]

RemediationAI

Vendor-released patch: jsPDF 4.2.0 - upgrade the jspdf dependency to >=4.2.0 (release https://github.com/parallax/jsPDF/releases/tag/v4.2.0, fix commit https://github.com/parallax/jsPDF/commit/2e5e156e284d92c7d134bce97e6418756941d5e6, advisory https://github.com/parallax/jsPDF/security/advisories/GHSA-67pg-wm7f-q7fj). Red Hat consumers should apply RHSA-2026:7110 and RHSA-2026:7128. If immediate upgrade is not possible, the vendor-recommended workaround is to sanitize image data and URLs before they reach addImage or html: validate that decoded GIF header width*height stays under a safe ceiling (the patch uses 512MB of pixels) and reject oversized images, and/or restrict addImage to a trusted allowlist of image sources rather than accepting arbitrary user-supplied data or remote URLs. The trade-off of source restriction is reduced functionality for features that legitimately need user-provided images; the trade-off of dimension validation is the need to parse headers yourself, which the upgrade does for you, so upgrading is strongly preferred.

Affected Packages

npm jspdf fix: 4.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

jsPDF embeds raster images by parsing them with an internal copy of the omggif GIF decoder (src/libs/omggif.js). A GIF logical screen / image descriptor declares width and height fields in its header; the decoder multiplies these to size a pixel buffer before any bounds checking. The root cause maps to CWE-400 (Uncontrolled Resource Consumption): attacker-controlled dimension fields drive an unbounded memory allocation (num_pixels = width * height) with no upper limit. The fix commit (2e5e156) adds two guards that throw 'Image dimensions exceed 512MB' when num_pixels exceeds 512*1024*1024. The affected component is the Node.js distribution of the package per CPE cpe:2.3:a:parall:jspdf:*:*:*:*:*:node.js:*:*, though the GHSA notes the flaw is both client-side and server-side since jsPDF runs in browsers and Node.

Know when Jspdf gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-reachable image input with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is purely availability via OOM crash, so C:N/I:N/A:H and scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

8
Analysis Updated
Jun 30, 2026 - 05:41 vuln.today
v5 - CVSS changed
Analysis Updated
Jun 30, 2026 - 05:41 vuln.today
v4 - CVSS changed
Analysis Updated
Jun 30, 2026 - 05:40 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 30, 2026 - 05:39 vuln.today
v2 - CVSS changed
CVSS changed
Jun 30, 2026 - 03:23 NVD
7.5 (HIGH) 8.7 (HIGH)
PoC Detected
Feb 23, 2026 - 19:13 vuln.today
Public exploit code
Patch released
Feb 23, 2026 - 19:13 nvd
Patch available
CVE Published
Feb 19, 2026 - 15:16 nvd
HIGH 7.5

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 npm packages depend on jspdf (2 direct, 0 indirect)

Ecosystem-wide dependent count for version 4.2.0.

Executive ViewAI

Why It Matters

jsPDF, a widely deployed open-source PDF generation library, contains a denial-of-service vulnerability (CVSS 8.7) in versions prior to 4.2.0 that allows any user submitting images to crash applications processing those files. Organizations using affected versions face potential service outages if image uploads or user-supplied content are enabled. A vendor patch (4.2.0) is available and should be prioritized given the straightforward exploitation path, despite current EPSS modeling indicating low active exploitation probability.

Business Impact: High
Compensating Controls

Apply vendor patch to jsPDF 4.2.0. Until patching is complete, implement input validation to reject images with declared dimensions exceeding 10,000 × 10,000 pixels to block the out-of-memory trigger mechanism.

Threat Intelligence Overview

EPSS Score
0.1%
Top 83% exploitable
Prevalence
High
jsPDF is a very widely used client/server PDF-generation npm library
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

cpe:2.3:a:parall:jspdf:*:*:*:*:*:node.js:*:*

More in Jspdf

View all
CVE-2026-25755 HIGH POC
8.8 Feb 19

PDF object injection in the jsPDF JavaScript library (npm package 'jspdf', versions prior to 4.2.0) lets an attacker who

CVE-2026-24737 HIGH POC
8.1 Feb 02

PDF generation in jsPDF prior to version 4.1.0 allows injection of arbitrary PDF objects through unsanitized input passe

CVE-2026-24133 MEDIUM POC
6.5 Feb 02

Denial of service in jsPDF prior to version 4.1.0 occurs when malicious BMP files with oversized dimension headers are p

CVE-2020-7691 MEDIUM POC
6.1 Jul 06

In all versions of the package jspdf, it is possible to use <<script>script> in order to go over the filtering regex. Ra

CVE-2020-7690 MEDIUM POC
6.1 Jul 06

All affected versions <2.0.0 of package jspdf are vulnerable to Cross-site Scripting (XSS). Rated medium severity (CVSS

CVE-2026-24043 MEDIUM POC
5.4 Feb 02

Jspdf versions up to 4.1.0 contains a vulnerability that allows attackers to inject arbitrary XML (CVSS 5.4).

CVE-2025-68428 CRITICAL
9.2 Jan 05

Local file inclusion and path traversal in the Node.js builds of jsPDF (dist/jspdf.node.js and dist/jspdf.node.min.js) p

CVE-2026-24040 MEDIUM POC
4.8 Feb 02

jsPDF versions prior to 4.1.0 contain a race condition in the addJS method where a shared module-scoped variable is over

CVE-2026-25940 HIGH
8.1 Feb 19

jsPDF versions prior to 4.2.0 allow attackers to inject arbitrary PDF objects including malicious JavaScript through uns

CVE-2021-23353 HIGH
7.5 Mar 09

This affects the package jspdf before 2.3.1. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable,

CVE-2025-57810 HIGH POC
8.7 Aug 26

jsPDF is a library to generate PDFs in JavaScript. Rated high severity (CVSS 8.7), this vulnerability is remotely exploi

CVE-2025-29907 HIGH POC
8.7 Mar 18

jsPDF is a library to generate PDFs in JavaScript. Rated high severity (CVSS 8.7), this vulnerability is remotely exploi

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy