CVE-2026-24040: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in parallax jsPDF
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 jsPDF@4.1.0.
AI Analysis
Technical Summary
jsPDF is a widely used JavaScript library for generating PDF documents. Prior to version 4.1.0, the addJS method in the Node.js build of jsPDF uses a shared module-scoped variable named 'text' to hold JavaScript content that will be embedded in the generated PDF. Because this variable is shared across all requests in a concurrent environment such as a Node.js web server, simultaneous PDF generation requests can interfere with each other. Specifically, if multiple requests invoke addJS concurrently, the 'text' variable can be overwritten by a subsequent request before the PDF document is finalized. This race condition leads to cross-user data leakage, where the PDF generated for one user may include JavaScript code and potentially sensitive data intended for another user. Although primarily a server-side issue, similar race conditions could theoretically occur in client-side environments if jsPDF is used concurrently in multi-threaded or asynchronous contexts. The vulnerability is categorized under CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization). The flaw was addressed and fixed in jsPDF version 4.1.0 by removing or properly isolating the shared state to prevent concurrent access conflicts. No known exploits are currently reported in the wild. The CVSS 4.0 vector indicates network attack vector, low attack complexity, no privileges required, no user interaction, and low impact on confidentiality and integrity but no impact on availability. This suggests that while the vulnerability is exploitable remotely without authentication, the impact is limited to confidentiality leakage in concurrent usage scenarios.
Potential Impact
For European organizations using jsPDF versions prior to 4.1.0 in server-side environments, this vulnerability poses a risk of cross-user data leakage. Sensitive information embedded in JavaScript within PDFs—such as user-specific data, tokens, or confidential scripts—could be inadvertently exposed to other users. This can lead to privacy violations, regulatory non-compliance (e.g., GDPR breaches), and reputational damage. Organizations providing PDF generation as part of web services or SaaS platforms are particularly at risk, especially if they handle sensitive or personal data. The impact is compounded in high-concurrency environments like busy web servers or multi-tenant applications. Although the vulnerability does not allow code execution or denial of service, the confidentiality breach alone is significant for sectors such as finance, healthcare, and government. The absence of known exploits reduces immediate risk, but the ease of exploitation in concurrent request scenarios means attackers could develop exploits if motivated. European organizations must consider this vulnerability in their risk assessments and patch management strategies to avoid data leakage incidents.
Mitigation Recommendations
The primary mitigation is to upgrade all jsPDF instances to version 4.1.0 or later, where the race condition has been fixed. For organizations unable to upgrade immediately, isolating PDF generation processes to avoid concurrent execution sharing the same Node.js process or module instance can reduce risk. Implementing request-level locking or queueing to serialize PDF generation requests can prevent simultaneous access to the shared variable. Reviewing and refactoring custom code that uses jsPDF’s addJS method to ensure no shared mutable state is accessed concurrently is also recommended. Additionally, auditing PDF generation workflows to minimize embedding sensitive JavaScript content can reduce exposure. Monitoring logs for anomalies in PDF generation timing or content can help detect potential exploitation attempts. Finally, organizations should incorporate this vulnerability into their vulnerability management and incident response plans, ensuring timely patching and awareness among development teams.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Poland
CVE-2026-24040: CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in parallax jsPDF
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 jsPDF@4.1.0.
AI-Powered Analysis
Technical Analysis
jsPDF is a widely used JavaScript library for generating PDF documents. Prior to version 4.1.0, the addJS method in the Node.js build of jsPDF uses a shared module-scoped variable named 'text' to hold JavaScript content that will be embedded in the generated PDF. Because this variable is shared across all requests in a concurrent environment such as a Node.js web server, simultaneous PDF generation requests can interfere with each other. Specifically, if multiple requests invoke addJS concurrently, the 'text' variable can be overwritten by a subsequent request before the PDF document is finalized. This race condition leads to cross-user data leakage, where the PDF generated for one user may include JavaScript code and potentially sensitive data intended for another user. Although primarily a server-side issue, similar race conditions could theoretically occur in client-side environments if jsPDF is used concurrently in multi-threaded or asynchronous contexts. The vulnerability is categorized under CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization). The flaw was addressed and fixed in jsPDF version 4.1.0 by removing or properly isolating the shared state to prevent concurrent access conflicts. No known exploits are currently reported in the wild. The CVSS 4.0 vector indicates network attack vector, low attack complexity, no privileges required, no user interaction, and low impact on confidentiality and integrity but no impact on availability. This suggests that while the vulnerability is exploitable remotely without authentication, the impact is limited to confidentiality leakage in concurrent usage scenarios.
Potential Impact
For European organizations using jsPDF versions prior to 4.1.0 in server-side environments, this vulnerability poses a risk of cross-user data leakage. Sensitive information embedded in JavaScript within PDFs—such as user-specific data, tokens, or confidential scripts—could be inadvertently exposed to other users. This can lead to privacy violations, regulatory non-compliance (e.g., GDPR breaches), and reputational damage. Organizations providing PDF generation as part of web services or SaaS platforms are particularly at risk, especially if they handle sensitive or personal data. The impact is compounded in high-concurrency environments like busy web servers or multi-tenant applications. Although the vulnerability does not allow code execution or denial of service, the confidentiality breach alone is significant for sectors such as finance, healthcare, and government. The absence of known exploits reduces immediate risk, but the ease of exploitation in concurrent request scenarios means attackers could develop exploits if motivated. European organizations must consider this vulnerability in their risk assessments and patch management strategies to avoid data leakage incidents.
Mitigation Recommendations
The primary mitigation is to upgrade all jsPDF instances to version 4.1.0 or later, where the race condition has been fixed. For organizations unable to upgrade immediately, isolating PDF generation processes to avoid concurrent execution sharing the same Node.js process or module instance can reduce risk. Implementing request-level locking or queueing to serialize PDF generation requests can prevent simultaneous access to the shared variable. Reviewing and refactoring custom code that uses jsPDF’s addJS method to ensure no shared mutable state is accessed concurrently is also recommended. Additionally, auditing PDF generation workflows to minimize embedding sensitive JavaScript content can reduce exposure. Monitoring logs for anomalies in PDF generation timing or content can help detect potential exploitation attempts. Finally, organizations should incorporate this vulnerability into their vulnerability management and incident response plans, ensuring timely patching and awareness among development teams.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-01-20T22:30:11.777Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69813005f9fa50a62f63a3d1
Added to database: 2/2/2026, 11:15:17 PM
Last enriched: 2/2/2026, 11:32:12 PM
Last updated: 2/7/2026, 1:33:52 AM
Views: 38
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.
Related Threats
CVE-2026-2071: Buffer Overflow in UTT 进取 520W
HighCVE-2026-25762: CWE-400: Uncontrolled Resource Consumption in adonisjs core
HighCVE-2026-25754: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in adonisjs core
HighCVE-2026-25644: CWE-295: Improper Certificate Validation in datahub-project datahub
HighCVE-2026-25804: CWE-287: Improper Authentication in antrea-io antrea
HighActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.