CVE-2026-31938
CVE-2026-31938 — jsPDF has HTML Injection in New Window paths
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) into the browser context the created PDF is opened in. The vulnerability can be exploited in the following scenario: the attacker provides values for the output options, for example via a web interface. These values are then passed unsanitized (automatically or semi-automatically) to the attack victim. The victim creates and opens a PDF with the attack vector using one of the vulnerable method overloads inside their browser. The attacker can thus inject scripts that run in the victims browser context and can extract or modify secrets from this context. The vulnerability has been fixed in [email protected]. As a workaround, sanitize user input before passing it to the output method.
Published Updated Sources: cvelistV5, GitHub_M
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
9.6
CRITICAL
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Total
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 9.6 | CVSS 3.1 | CRITICAL | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-79
References
8 on the record
- github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5
x_refsource_CONFIRM
- github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7
x_refsource_MISC
- github.com/parallax/jsPDF/releases/tag/v4.2.1
x_refsource_MISC
- access.redhat.com/security/cve/CVE-2026-31938
vdb-entry, x_refsource_REDHAT
- bugzilla.redhat.com/show_bug.cgi?id=2448550
issue-tracking, x_refsource_REDHAT
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31938.json
x_sadp-csaf-vex
- access.redhat.com/errata/RHSA-2026:7110
vendor-advisory, x_refsource_REDHAT
- access.redhat.com/errata/RHSA-2026:7128
vendor-advisory, x_refsource_REDHAT
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2019-3929 Crestron Multiple Products Command Injection VulnerabilityCVSS 9.8 · CISA KEV
- CVE-2024-42009 RoundCube Webmail Cross-Site Scripting VulnerabilityCVSS 9.3 · CISA KEV
- CVE-2023-34192 Synacor Zimbra Collaboration Suite (ZCS) Cross-Site Scripting (XSS) VulnerabilityCVSS 9.0 · CISA KEV
- CVE-2019-18426 WhatsApp Cross-Site Scripting VulnerabilityCVSS 8.2 · CISA KEV
- CVE-2024-43573 Microsoft Windows MSHTML Platform Spoofing VulnerabilityCVSS 8.1 · CISA KEV
- CVE-2024-44309 Apple Multiple Products Cross-Site Scripting (XSS) VulnerabilityCVSS 6.3 · CISA KEV
Elsewhere on this site
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.