CVE-2026-25755: CWE-94: Improper Control of Generation of Code ('Code Injection') in parallax jsPDF
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in [email protected]. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the `addJS` method.
AI Analysis
Technical Summary
The jsPDF library, used for generating PDFs in JavaScript, has a vulnerability (CVE-2026-25755) classified as CWE-94 (Improper Control of Generation of Code). Prior to version 4.2.0, the addJS method accepts user input that can be crafted to escape JavaScript string delimiters, enabling injection of arbitrary PDF objects. This allows an attacker to execute malicious code or modify the PDF structure, impacting any user who opens the generated PDF. The issue is resolved in [email protected]. The Red Hat advisories confirm the vulnerability and recommend upgrading to fixed versions.
Potential Impact
An attacker can inject arbitrary PDF objects into documents generated by vulnerable versions of jsPDF, potentially executing malicious actions or altering document content. This affects the confidentiality and integrity of the PDF content for any user opening the compromised PDF. There is no indication of availability impact. The CVSS 3.1 score is 8.1 (High), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in jsPDF version 4.2.0. Users and developers should upgrade to version 4.2.0 or later to remediate this vulnerability. As a temporary workaround, escape parentheses in any user-supplied JavaScript code before passing it to the addJS method to prevent injection. Follow vendor advisories for official patches and updates.
CVE-2026-25755: CWE-94: Improper Control of Generation of Code ('Code Injection') in parallax jsPDF
Description
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.2.0, user control of the argument of the `addJS` method allows an attacker to inject arbitrary PDF objects into the generated document. By crafting a payload that escapes the JavaScript string delimiter, an attacker can execute malicious actions or alter the document structure, impacting any user who opens the generated PDF. The vulnerability has been fixed in [email protected]. As a workaround, escape parentheses in user-provided JavaScript code before passing them to the `addJS` method.
CVSS v3.1
Score 8.1high
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The jsPDF library, used for generating PDFs in JavaScript, has a vulnerability (CVE-2026-25755) classified as CWE-94 (Improper Control of Generation of Code). Prior to version 4.2.0, the addJS method accepts user input that can be crafted to escape JavaScript string delimiters, enabling injection of arbitrary PDF objects. This allows an attacker to execute malicious code or modify the PDF structure, impacting any user who opens the generated PDF. The issue is resolved in [email protected]. The Red Hat advisories confirm the vulnerability and recommend upgrading to fixed versions.
Potential Impact
An attacker can inject arbitrary PDF objects into documents generated by vulnerable versions of jsPDF, potentially executing malicious actions or altering document content. This affects the confidentiality and integrity of the PDF content for any user opening the compromised PDF. There is no indication of availability impact. The CVSS 3.1 score is 8.1 (High), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in jsPDF version 4.2.0. Users and developers should upgrade to version 4.2.0 or later to remediate this vulnerability. As a temporary workaround, escape parentheses in any user-supplied JavaScript code before passing it to the addJS method to prevent injection. Follow vendor advisories for official patches and updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-05T18:35:52.357Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-25755","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:7110","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:7128","vendor":"Red Hat"}]
Threat ID: 6997264f5215391843713250
Added to database: 02/19/2026, 15:03:43 UTC
Last enriched: 06/30/2026, 21:27:06 UTC
Last updated: 07/07/2026, 22:28:20 UTC
Views: 786
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.