CVE-2026-24040 Details
Description
jsPDF is a library to generate PDFs in JavaScript. Prior to 4.1.0, the addJS method in the jspdf Node.js build utilizes a shared module-scoped variable (text) to store JavaScript content. When used in a concurrent environment (e.g., a Node.js web server), this variable is shared across all requests. If multiple requests generate PDFs simultaneously, the JavaScript content intended for one user may be overwritten by a subsequent request before the document is generated. This results in Cross-User Data Leakage, where the PDF generated for User A contains the JavaScript payload (and any embedded sensitive data) intended for User B. Typically, this only affects server-side environments, although the same race conditions might occur if jsPDF runs client-side. The vulnerability has been fixed in [email protected].
A shared state race condition vulnerability has been identified in the jsPDF library, specifically in versions through 4.0.0. The issue arises in the Node.js build, where the addJS method uses a shared module-scoped variable to store JavaScript content. In concurrent environments, such as a Node.js web server, this variable is accessible across all requests. As a result, if multiple requests to generate PDFs are made simultaneously, the JavaScript content for one user can be overwritten by another, leading to cross-user data leakage. This means that the PDF generated for one user may inadvertently include JavaScript payloads and sensitive data intended for another user. While this vulnerability primarily affects server-side environments, similar race conditions could occur if jsPDF is used client-side.
Users can upgrade to jsPDF version 4.1.0 or later, where this vulnerability has been fixed. The patch moves the shared variable into the function scope, ensuring that data is not overwritten between different jsPDF instances. For those unable to upgrade, a temporary workaround is to avoid using the addJS method in concurrent server-side environments, or to process requests sequentially using a queue.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 3, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-362 | Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| parall jspdf | < 4.1.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 18, 2026 | Initial Analysis | [email protected] |
| Feb 2, 2026 | New CVE Received | [email protected] |