# CVE-2026-24040: jsPDF has a Shared State Race Condition in addJS Plugin

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-02T18:20:02.000Z
- Modified: 2026-09-10T03:50:59.422Z
- Also known as: GHSA-cjw8-79x6-5cj4
- Weaknesses: CWE-200, CWE-362
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- parallax jsPDF: < 4.1.0
- jspdf (npm): before 4.1.0
- parall jspdf: before 4.1.0

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/parallax/jsPDF/security/advisories/GHSA-cjw8-79x6-5cj4> (exploit, vendor-advisory, web)
- <https://github.com/parallax/jsPDF/commit/2863e5c26afef211a545e8c174ab4d5fce3b8c0e> (patch, web)
- <https://github.com/parallax/jsPDF/releases/tag/v4.1.0> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-24040> (advisory)
- <https://github.com/parallax/jsPDF> (package)

## Sources

- CVE List: [CVE-2026-24040](https://www.cve.org/CVERecord?id=CVE-2026-24040), CVE Terms of Use, modified 2026-02-03
- GitHub Advisory Database: [GHSA-cjw8-79x6-5cj4](https://github.com/advisories/GHSA-cjw8-79x6-5cj4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-24040](https://nvd.nist.gov/vuln/detail/CVE-2026-24040), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-24040 · Whole record: https://cve.day/CVE-2026-24040.json · Rebuilt by cve.day 2026-11-25T22:59:13.374Z
