The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-25535

CVE-2026-25535: jsPDF Library DoS Vulnerability

CVE-2026-25535 is a denial of service vulnerability in jsPDF library affecting the addImage method. Malicious GIF files cause memory exhaustion. This article covers technical details, affected versions, and mitigation.

Published: February 20, 2026

CVE-2026-25535 Overview

CVE-2026-25535 is a Denial of Service (DoS) vulnerability affecting jsPDF, a popular JavaScript library used for generating PDF documents in web applications. The vulnerability exists in the addImage method and related functions, where unsanitized image data can trigger excessive memory allocation, leading to out-of-memory conditions and application crashes.

When an attacker supplies a maliciously crafted GIF file with exaggerated width and/or height values in its header metadata, the library attempts to allocate memory based on these dimensions without proper bounds checking. This Resource Exhaustion vulnerability (CWE-400) can be exploited remotely without authentication, making it particularly dangerous for web applications that accept user-uploaded images for PDF generation.

Critical Impact

Applications using jsPDF to process user-supplied images are vulnerable to denial of service attacks that can cause memory exhaustion and crash the hosting process, potentially affecting service availability for all users.

Affected Products

  • jsPDF versions prior to 4.2.0
  • Applications using the addImage method with user-controlled input
  • Applications using the html method to render HTML content containing images

Discovery Timeline

  • 2026-02-19 - CVE CVE-2026-25535 published to NVD
  • 2026-02-19 - Last updated in NVD database

Technical Details for CVE-2026-25535

Vulnerability Analysis

The vulnerability resides in the GIF image processing component of jsPDF, specifically within the omggif.js library that handles GIF decoding. When the addImage method receives a GIF file, it parses the image header to extract dimension information. The GIF file format stores width and height as 16-bit values in its header, allowing theoretical maximum dimensions of 65,535 x 65,535 pixels.

Prior to the fix, the library would calculate the required pixel buffer size by multiplying width by height without validating the result against reasonable memory limits. An attacker could craft a GIF with header values specifying enormous dimensions while keeping the actual file size small. When processed, the library attempts to allocate a Uint8Array buffer for num_pixels entries, which could request multiple gigabytes of memory for a single image.

Root Cause

The root cause is improper input validation in the GIF decoding functionality. The decodeAndBlitFrameBGRA function directly uses the width and height values parsed from the GIF header to calculate buffer sizes without implementing any sanity checks or maximum bounds. This allows malformed GIF files to trigger unbounded memory allocation, classifying this as a CWE-400 (Uncontrolled Resource Consumption) vulnerability.

Attack Vector

The attack can be executed remotely over the network by any unauthenticated user who can influence image data passed to the vulnerable methods. Attack scenarios include:

  1. Direct Upload: Uploading a malicious GIF through a web form that generates PDFs
  2. URL Reference: Providing a URL pointing to a malicious GIF hosted on an attacker-controlled server
  3. HTML Injection: Embedding a malicious image reference in HTML content processed by the html method

The attack requires no user interaction beyond triggering the PDF generation process and can be executed with a minimal payload (a few bytes for the GIF header).

javascript
   this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {
     var frame = this.frameInfo(frame_num);
     var num_pixels = frame.width * frame.height;
+
+    if (num_pixels > 512 * 1024 * 1024) {
+      throw new Error("Image dimensions exceed 512MB, which is too large.");
+    }
+
     var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
     GifReaderLZWOutputIndexStream(
       buf,

Source: GitHub Commit

Detection Methods for CVE-2026-25535

Indicators of Compromise

  • Sudden memory spikes in Node.js processes or browser tabs running PDF generation
  • Application crashes with "out of memory" or "heap limit exceeded" errors during PDF operations
  • GIF files with abnormally small file sizes but large reported dimensions in metadata
  • Repeated requests to PDF generation endpoints with GIF image parameters

Detection Strategies

  • Monitor server-side memory usage patterns for anomalous spikes correlated with PDF generation requests
  • Implement request logging that captures image dimension metadata before processing
  • Set up alerting for Node.js process crashes with heap allocation failure messages
  • Analyze uploaded GIF files for dimension/file-size ratio anomalies (small files claiming large dimensions)

Monitoring Recommendations

  • Configure memory limits and monitoring for processes handling PDF generation workloads
  • Implement request rate limiting on PDF generation endpoints to reduce DoS impact
  • Set up synthetic monitoring for PDF generation functionality with baseline performance metrics
  • Enable detailed logging for the addImage and html method calls including input source information

How to Mitigate CVE-2026-25535

Immediate Actions Required

  • Upgrade jsPDF to version 4.2.0 or later immediately
  • Audit application code to identify all locations using addImage or html methods with user input
  • Implement input validation for image dimensions before passing data to jsPDF
  • Consider implementing memory limits for PDF generation processes as defense in depth

Patch Information

The vulnerability has been addressed in jsPDF version 4.2.0. The fix adds a bounds check in the GIF decoding function that limits the maximum pixel count to 512MB (512 * 1024 * 1024 pixels), throwing an error if exceeded. The security patch is available in commit 2e5e156e284d92c7d134bce97e6418756941d5e6.

For detailed information, see the GitHub Security Advisory GHSA-67pg-wm7f-q7fj and Release Notes for v4.2.0.

Workarounds

  • Validate image dimensions before passing to addImage by parsing image headers and rejecting oversized values
  • Implement server-side image processing to re-encode user uploads before PDF generation
  • Use allowlists for image sources rather than accepting arbitrary user-provided URLs
  • Deploy PDF generation in isolated containers with strict memory limits to contain potential DoS impact
bash
# Configuration example
# Update jsPDF to patched version
npm update jspdf@4.2.0

# Or install specific patched version
npm install jspdf@^4.2.0

# Verify installed version
npm list jspdf

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechJspdf

  • SeverityHIGH

  • CVSS Score8.7

  • Known ExploitedNo
  • CVSS Vector
  • 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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400
  • Technical References
  • GitHub CVE Analysis

  • GitHub Commit Overview

  • GitHub Release Notes v4.2.0

  • GitHub Security Advisory GHSA-67pg-wm7f-q7fj
  • Related CVEs
  • CVE-2026-24133: jsPDF Library DoS Vulnerability

  • CVE-2026-31938: Parall Jspdf XSS Vulnerability

  • CVE-2026-31898: jsPDF Library XSS Vulnerability

  • CVE-2026-25940: jsPDF Acroform XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English