Cyber Security News

jsPDF Vulnerability Exposes Millions of Developers to Object Injection Attacks

A newly disclosed security flaw in the popular jsPDF library has exposed millions of web developers to PDF Object Injection attacks, allowing remote attackers to embed arbitrary objects and actions into generated PDF documents.

Tracked as CVE-2026-25755, the vulnerability affects the addJS method used to embed JavaScript code in PDF files.

The issue arises from improper sanitization of user-supplied input in the javascript.js file within jsPDF. Specifically, the problematic line concatenates unsanitized input directly into the PDF stream using the following syntax:

this.internal.out("/JS (" + text + ")");

This logic fails to escape the closing parenthesis, which acts as a string delimiter in the PDF specification.

By injecting a payload such as) >> /Action …, attackers can prematurely terminate the /JS string and inject arbitrary PDF structures, gaining full control over embedded objects.

CVE IDCVSS ScoreDescription
CVE-2026-257558.8 (High)PDF Object Injection in jsPDF’s addJS method allows arbitrary object injection and action execution in generated PDFs.

Unlike typical JavaScript-based XSS attacks, this vulnerability manipulates PDF object hierarchies directly. That allows malicious actors to execute actions or modify document structures even when JavaScript is disabled in the viewer.

Critical impacts include:

JS-disabled execution: Injected PDF actions (e.g., /OpenAction) can trigger automatically, bypassing JavaScript restrictions.

Document manipulation: Attackers can inject, encrypt, or modify the/Annots or /Signatures sections to modify metadata, perform phishing, or alter the PDF’s appearance.

Cross-viewer risk: Lightweight PDF viewers, especially mobile or embedded ones, may execute injected actions due to strict compliance with PDF object parsing rules.

Security researcher ZeroXJacks, who discovered the issue, demonstrated a proof-of-concept that uses a crafted addJS payload to trigger custom PDF actions when the document opens.

This highlights a serious risk for applications that dynamically generate PDFs from user input. The underlying flaw stems from missing input validation and escaping per the PDF specification.

Developers are strongly advised to update to jsPDF version 4.1.0 or higher, where input is sanitized correctly by escaping parentheses and backslashes.

Until patched, users should avoid embedding untrusted or user-generated content using addJS or related methods and enforce strict input validation on any client-side PDF creation workflow.

Follow us on Google News, LinkedIn, and X for daily cybersecurity updates. Contact us to feature your stories.

Abinaya

Abi is a Security Editor and fellow reporter with Cyber Security News. She is covering various cyber security incidents happening in the Cyber Space.

Recent Posts

Google Unveils New Android AI Protections to Block Scam Calls, Phishing Links and OTP Theft

Google has announced a new set of Android security protections designed to stop mobile scams…

5 hours ago

Hackers Exploiting Plex Vulnerabilities in the Wild to Deploy Cryptominer Malware

Hackers are exploiting flaws in Plex Media Server to install cryptocurrency mining malware, with a…

7 hours ago

Microsoft Confirms October Windows Updates Can Break Exchange Server Email Services

Microsoft has confirmed that Windows Server security updates released on October 13, 2026, can disrupt…

7 hours ago

OpenCode Security Breach Exposes Third-Party API Keys of its Console Users

OpenCode has disclosed a security breach affecting 1.4% of its Console users, warning that third-party…

1 day ago

Claude AI Solves 25-Year NSA Cryptography Mystery in Just 30 Minutes

Anthropic says an internal Claude research model has traced the origins of five NSA-supplied elliptic…

2 days ago

Hackers used Compromised ConnectWise Backup Credentials to Hack 173 Microsoft 365 Accounts

Hackers used a stolen ConnectWise Cloud Backup credential to sign in to 173 Microsoft 365…

2 days ago