Quick answers
- Is CVE-2026-24040 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-24040 being exploited in the wild.
- How severe is CVE-2026-24040?
- Medium severity, with a CVSS score of 4, published 2 February 2026.
- Which products and versions are affected?
- jspdf (npm) SEMVER:introduced=0,fixed=4.1.0.
- Is there a fix for CVE-2026-24040?
- Yes. jspdf (npm): upgrade to 4.1.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-24040 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-24040?
- Check whether you run jspdf (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- jspdf (npm): upgrade to 4.1.0 or later
npm install jspdf@4.1.0
Technical details
The vulnerability is a classic shared state race condition (CWE-362) in the addJS method of jsPDF's Node.js build. The root cause is the use of a module-scoped variable named "text" to store JavaScript content without proper instance-level isolation. In concurrent environments (such as Node.js web servers), when multiple requests invoke addJS() simultaneously, a second request can overwrite the shared variable before the first request's PDF is saved, resulting in cross-user data leakage. The attack requires only network access and does not require authentication or user interaction; it naturally occurs in any multi-request server scenario. Attackers can harvest sensitive data, credentials, or other payloads intended for other users. The vulnerability was fixed in jspdf@4.0.1 by moving the variable into function scope to ensure instance isolation.
Affected products
- jsPDF Contributors jsPDF before 4.0.1
Identifiers
- CVE-2026-24040
- GHSA-cjw8-79x6-5cj4
Timeline
- 2026-02-02: disclosed
- 2026-02-02: patched: Fixed in jspdf@4.0.1
- 2026-02-02: advisory: CVE-2026-24040 and GHSA-cjw8-79x6-5cj4 published