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
Share

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
qualitative

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

11
Analysis Updated
Jun 30, 2026 - 05:41 vuln.today
v5 (cvss_changed)
Source Code Evidence Fetched
Jun 30, 2026 - 05:41 vuln.today
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)
Re-analysis Queued
Jun 30, 2026 - 03:23 vuln.today
cvss_changed
CVSS changed
Jun 30, 2026 - 03:23 NVD
7.5 (HIGH) 8.7 (HIGH)
Analysis Generated
Mar 12, 2026 - 22:03 vuln.today
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

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.

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.

AnalysisAI

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%.

Technical ContextAI

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.

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.

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

Share

CVE-2026-25535 vulnerability details – vuln.today

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