Allocation of Resources Without Limits or Throttling Affecting jspdf package, versions <4.2.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-JSPDF-15322681
  • published20 Feb 2026
  • disclosed19 Feb 2026
  • creditZeroXJacks

Introduced: 19 Feb 2026

NewCVE-2026-25535  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade jspdf to version 4.2.0 or higher.

Overview

jspdf is a PDF Document creation from JavaScript

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the addImage and html methods. An attacker can cause excessive memory allocation and application unavailability by supplying malicious GIF files with large width or height values as image data or URLs.

Workaround

This vulnerability can be mitigated by sanitizing image data or URLs before passing them to the affected methods.

PoC

import { jsPDF } from "jspdf" 

// malicious GIF image data with large width/height headers
const payload = ...

const doc = new jsPDF();

doc.addImage(payload, "GIF", 0, 0, 100, 100);

CVSS Base Scores

version 4.0
version 3.1