CVE-2026-31938: parall jspdf Cross-site Scripting
Vulnerability summary
CVE-2026-31938 is a critical (CVSS 9.6) Cross-site Scripting vulnerability in parall jspdf. EPSS estimates a 0.42% chance of exploitation in the next 30 days, higher than 34.8% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 18-03-2026PublishedVulnerability first disclosed.
- 07-09-2026Last modifiedVulnerability information updated.
Description
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 jspdf@4.2.1. As a workaround, sanitize user input before passing it to the output method.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · WolfiEcosystem advisory · calculated9.6CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
- OSV · NpmEcosystem advisory · calculated9.6CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
- OSV · ChainguardEcosystem advisory · calculated9.6CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L
- NVDNIST6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NDiffers
EPSS trend
Probability
0.42%
Chance of exploitation in the next 30 days
Percentile
35%
Versus all other CVEs
30-day change
+0.16 pp
From 0.26% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Chainguard50 products
- opensearch-dashboards-2-alerting-dashboards-plugin< 2.19.5-r2
- opensearch-dashboards-2-anomaly-detection-dashboards-plugin< 2.19.5-r2
- opensearch-dashboards-2-dashboards-maps< 2.19.5-r2
- opensearch-dashboards-2-dashboards-notifications< 2.19.5-r2
- opensearch-dashboards-2-dashboards-observability< 2.19.5-r2
Wolfi12 products
- opensearch-dashboards-3-alerting-dashboards-plugin< 3.5.0-r9
- opensearch-dashboards-3-anomaly-detection-dashboards-plugin< 3.5.0-r9
- opensearch-dashboards-3-dashboards-maps< 3.5.0-r9
- opensearch-dashboards-3-dashboards-notifications< 3.5.0-r9
- opensearch-dashboards-3-dashboards-observability< 3.5.0-r9
Npm1 product
- jspdf< 4.2.1
Parall1 product
- jspdf< 4.2.1
Parallax1 product
- jspdf< 4.2.1
5 vendors · 65 products
References
11 links- github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5X Refsource CONFIRMAdvisoryWEBMitigationVendor Advisory
- github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7X Refsource MISCFIXWEBPatch
Show all 11 references
- github.com/parallax/jsPDFPACKAGE