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-25755

CVE-2026-25755: jsPDF Library RCE Vulnerability

CVE-2026-25755 is a remote code execution flaw in jsPDF, a JavaScript PDF generation library. Attackers can inject arbitrary PDF objects via the addJS method. This article covers technical details, affected versions, and mitigation.

Published: February 20, 2026

CVE-2026-25755 Overview

CVE-2026-25755 is a Code Injection vulnerability affecting jsPDF, a popular JavaScript library used to generate PDF documents. Prior to version 4.2.0, the addJS method fails to properly sanitize user-controlled input, allowing attackers to inject arbitrary PDF objects into generated documents. By crafting a malicious payload that escapes the JavaScript string delimiter (parentheses), an attacker can execute malicious actions or alter the document structure, potentially impacting any user who opens the generated PDF.

Critical Impact

Attackers can inject arbitrary PDF objects through unsanitized user input in the addJS method, potentially executing malicious JavaScript when victims open the compromised PDF documents.

Affected Products

  • jsPDF versions prior to 4.2.0
  • Applications utilizing jsPDF's addJS method with user-controlled input
  • Web applications generating PDFs with embedded JavaScript functionality

Discovery Timeline

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

Technical Details for CVE-2026-25755

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code, or Code Injection). The addJS method in jsPDF allows developers to embed JavaScript code within generated PDF documents. However, versions prior to 4.2.0 failed to properly escape special characters—specifically parentheses—in user-provided JavaScript strings before embedding them into the PDF structure.

PDF documents use parentheses as string delimiters in their object notation. When user input containing unescaped parentheses is passed to the addJS method, an attacker can break out of the intended JavaScript string context and inject arbitrary PDF objects or commands into the document structure.

Root Cause

The root cause lies in the missing input sanitization for parentheses characters within the addJS method. The vulnerable code directly embedded user-provided JavaScript into PDF stream objects without escaping the ( and ) characters that serve as string delimiters in PDF syntax. This allows attackers to terminate the intended string early and inject malicious PDF object content.

Attack Vector

The attack requires network access and user interaction—an attacker must convince a victim to open a maliciously crafted PDF generated through a vulnerable application. The attack chain involves:

  1. Attacker identifies an application using a vulnerable jsPDF version that passes user input to addJS
  2. Attacker crafts input containing parentheses designed to escape the PDF string context
  3. The application generates a PDF with injected malicious content
  4. When a victim opens the PDF, the injected code or objects execute
javascript
    * @returns {jsPDF}
    */
   jsPDFAPI.addJS = function(javascript) {
-    // FIX: Move variables inside function scope to prevent shared state
-    // between multiple jsPDF instances
     var jsNamesObj;
     var jsJsObj;
-    var text = javascript;
+    // Escape only unescaped parentheses, without double-escaping already escaped ones
+    function escapeParens(str) {
+      let out = "";
+      for (let i = 0; i < str.length; i++) {
+        const ch = str[i];
+        if (ch === "(" || ch === ")") {
+          // Count preceding backslashes to determine if the paren is already escaped
+          let bs = 0;
+          for (let j = i - 1; j >= 0 && str[j] === "\\"; j--) {
+            bs++;
+          }
+          if (bs % 2 === 0) {
+            out += "\\" + ch;
+          } else {
+            out += ch;
+          }
+        } else {
+          out += ch;
+        }
+      }
+      return out;
+    }

Source: GitHub Commit Update

Detection Methods for CVE-2026-25755

Indicators of Compromise

  • PDF documents containing unexpected or malicious JavaScript payloads
  • Unusual PDF object structures with injected content following JavaScript strings
  • Application logs showing suspicious parentheses sequences in addJS input parameters
  • Generated PDFs triggering security warnings in PDF readers

Detection Strategies

  • Implement static code analysis to identify jsPDF versions below 4.2.0 in application dependencies
  • Monitor for user input containing escape sequences or parentheses patterns targeting PDF injection
  • Deploy file integrity monitoring on PDF generation endpoints to detect anomalous output
  • Use software composition analysis (SCA) tools to flag vulnerable jsPDF packages

Monitoring Recommendations

  • Enable logging for all addJS method invocations with input parameter capture
  • Monitor PDF generation services for unusual patterns in JavaScript embedding requests
  • Implement Content Security Policy headers where applicable to restrict PDF JavaScript execution
  • Review dependency manifests (package.json, package-lock.json) for jsPDF version compliance

How to Mitigate CVE-2026-25755

Immediate Actions Required

  • Upgrade jsPDF to version 4.2.0 or later immediately
  • Audit all code paths where user input may reach the addJS method
  • Implement input validation to reject or sanitize parentheses in JavaScript strings
  • Review recently generated PDFs for signs of object injection

Patch Information

The vulnerability has been fixed in jsPDF version 4.2.0. The patch introduces the escapeParens function that properly escapes parentheses characters in user-provided JavaScript code before embedding them into PDF objects. The fix intelligently handles already-escaped parentheses to avoid double-escaping.

For detailed patch information, see the GitHub Security Advisory GHSA-9vjf-qc39-jprp and the GitHub jsPDF Release v4.2.0.

Workarounds

  • Escape parentheses in user-provided JavaScript code before passing to addJS method
  • Implement server-side validation to strip or reject input containing ( or ) characters
  • Disable JavaScript embedding functionality if not required for your use case
  • Use Content Security Policy to restrict JavaScript execution in generated PDFs
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 --save

# 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
  • TypeRCE

  • Vendor/TechJspdf

  • SeverityHIGH

  • CVSS Score8.1

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityNone
  • CWE References
  • CWE-94
  • Technical References
  • GitHub CVE Details

  • GitHub Commit Update

  • GitHub jsPDF Release v4.2.0

  • GitHub Security Advisory GHSA-9vjf-qc39-jprp
  • Related CVEs
  • CVE-2026-31938: Parall Jspdf XSS Vulnerability

  • CVE-2026-31898: jsPDF Library XSS Vulnerability

  • CVE-2026-25940: jsPDF Acroform XSS Vulnerability

  • CVE-2026-25535: jsPDF Library DoS Vulnerability
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