JavaScript PDF Library jsPDF Vulnerability Exposes Users to Document Manipulation
CVE-2026-25755
Key Information:
Badges
What is CVE-2026-25755?
The jsPDF library, widely used for generating PDFs in JavaScript, is subject to a security flaw that allows attackers to control the parameters of the addJS method. This oversight enables the injection of arbitrary PDF objects, which can lead to execution of malicious actions or manipulation of the document structure. When users open affected PDFs, they are at risk of unintended alterations or security breaches. The issue is resolved in version 4.2.0 of jsPDF, and as a preventive measure, it is recommended to escape parentheses in user-supplied JavaScript code before using the addJS method.
Affected Version(s)
jsPDF < 4.2.0
Exploit Proof of Concept (PoC)
PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.
