
CVE catalog
CVE-2026-31938
jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.2.1, user control of the `options` argument of the `output` function allows attackers to inject arbitrary HTML (such as scripts) i
- Severity
- Critical · CVSS 9.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.27% · Oct 25, 2026
A flaw was found in jsPDF, a JavaScript library for generating PDFs. A remote attacker can exploit this vulnerability by providing malicious input to the `options` argument of the `output` function. When a victim creates and opens a PDF using this unsanitized input, arbitrary HTML, including scripts, can be injected and executed within the victim's browser context. This Cross-Site Scripting (XSS) vulnerability allows the attacker to extract or modify sensitive information from the victim's browser. jspdf: jsPDF: Cross site scripting via unsanitized output options The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Npm | jspdf | Not reported | 4.2.1 | fixed |
| Cpe | jspdf | Not reported | Not reported | unknown |
| Cpe | jspdf | Not reported | 4.2.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Npm | jspdf | npm | Not reported | 4.2.1 | Not reported | Not reported | Not reported |
| Cpe | jspdf | cpe | Not reported | 4.2.1 | Not reported | NVD-CVE-2026-31938 | Not reported |
OpenFactory catalog packages
No matching packages in this catalog.
Observed:
References
- [https://github.com/advisories/GHSA-wfv2-pwc8-crg5]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-31938]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31938.json]
- [https://wid.cert-bund.de/.well-known/csaf/white/2026/wid-sec-w-2026-2933.json]
[CERT-Bund public advisories] · [FIRST EPSS] · [GitHub Advisory Database] · [National Vulnerability Database (NVD)] · [Red Hat security advisories and VEX]