GHSA-wfv2-pwc8-crg5 · Severity: critical · Ecosystem: npm — 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.
Conclusion & alert: CVE-2026-31938 is rated Moderate Risk (43.9/100): CVSS Critical severity, with low exploitation likelihood (EPSS 0.24%). Mandatory action: Review affected assets and schedule remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.05% | 0.24% | +0.19% |
| 2 | 2026-05-25 | 0.04% | 0.05% | +0.01% |
| 3 | 2026-03-18 | — | 0.04% | — |
Full EPSS history (3 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 9.6 | 3.1 | CRITICAL |
|
2.8 | 6.0 | [email protected] |
| 6.1 | 3.1 | MEDIUM |
|
2.8 | 2.7 | [email protected] |
GHSA-wfv2-pwc8-crg5 · Severity: critical · Ecosystem: npm — jsPDF has HTML Injection in New Window paths
| vendor | priority | summary | link |
|---|---|---|---|
redhat
|
high | — | https://access.redhat.com/security/cve/CVE-2026-31938 |
| URL | Tags |
|---|---|
| https://github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7 | Patch |
| https://github.com/parallax/jsPDF/releases/tag/v4.2.1 | Product Release Notes |
| https://github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5 | Mitigation Vendor Advisory |