{"id":"CVE-2026-31938","aliases":["GHSA-wfv2-pwc8-crg5"],"summary":"jsPDF has HTML Injection in New Window paths","published_at":"2026-03-17T17:07:59Z","modified_at":"2026-09-10T03:50:41.577731Z","products":[],"rating":{"severity":"critical","score":9.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L","attack_path":"internet_unauthenticated","user_interaction":true,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"Red Hat","rating":"Important"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.003169999923557043,"percentile":0.2515699863433838,"date":"2026-11-19T00:00:00Z"},"priority":11.1,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"CVE","package":"parallax/jsPDF","versions":["< 4.2.1"],"provider":"cvelistv5","source":"CVE-2026-31938","relation":"self"},{"ecosystem":"NVD","package":"parall:jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.1"}]}],"fixed":["4.2.1"],"provider":"nvd","source":"CVE-2026-31938","relation":"self"},{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.5.2-tuxcare.0"},{"fixed":"2.5.2-tuxcare.8"}]}],"versions":["2.5.2","2.5.2-tuxcare.1","2.5.2-tuxcare.2","2.5.2-tuxcare.3","2.5.2-tuxcare.4","2.5.2-tuxcare.5","2.5.2-tuxcare.6","2.5.2-tuxcare.7"],"fixed":["2.5.2-tuxcare.8"],"provider":"osv","source":"CLSA-2026-1773620214","relation":"upstream"},{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.4-tuxcare.0"},{"fixed":"3.0.4-tuxcare.7"}]}],"versions":["3.0.4","3.0.4-tuxcare.1","3.0.4-tuxcare.2","3.0.4-tuxcare.3","3.0.4-tuxcare.4","3.0.4-tuxcare.5","3.0.4-tuxcare.6"],"fixed":["3.0.4-tuxcare.7"],"provider":"osv","source":"CLSA-2026-1775176117","relation":"upstream"},{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.5.1-tuxcare.0"},{"fixed":"2.5.1-tuxcare.1"}]}],"versions":["2.5.1"],"fixed":["2.5.1-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1780534264","relation":"upstream"},{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.4.1-tuxcare.0"},{"fixed":"1.4.1-tuxcare.2"}]}],"versions":["1.4.1","1.4.1-tuxcare.1"],"fixed":["1.4.1-tuxcare.2"],"provider":"osv","source":"CLSA-2026-1780966320","relation":"upstream"},{"ecosystem":"npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.2.1"}]}],"fixed":["4.2.1"],"provider":"osv","source":"GHSA-wfv2-pwc8-crg5","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.8::el8","status":"fixed","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":["RHSA-2026:7110"],"provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.8::el8","status":"not_affected","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.9","cpe":"cpe:/a:redhat:advanced_cluster_security:4.9::el8","status":"fixed","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":["RHSA-2026:7128"],"provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.9","cpe":"cpe:/a:redhat:advanced_cluster_security:4.9::el8","status":"not_affected","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-31938"}],"records":[{"provider":"csaf-bsi","source_id":"WID-SEC-W-2026-2933","relation":"upstream","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2026-2933","license":"TLP:CLEAR, mirroring permitted","published_at":"2026-08-19T22:00:00Z","modified_at":"2026-11-02T23:00:00Z","summary":"Splunk SOAR: Mehrere Schwachstellen","details":"Ein Angreifer kann mehrere Schwachstellen in Splunk SOAR ausnutzen, um Sicherheitsvorkehrungen zu umgehen, um Informationen offenzulegen, um Dateien zu manipulieren, um einen SQL-Injection Angriff durchzuführen, um einen Cross-Site Scripting Angriff durchzuführen, und um beliebigen Programmcode auszuführen.\n\nSplunk SOAR ist eine Sicherheitsautomatisierungs- und Reaktionsplattform, die es Unternehmen ermöglicht, Sicherheitsvorfälle zu orchestrieren und zu automatisieren.","severity":[{"type":"BSI","score":"hoch","source":"WID-SEC-W-2026-2933"}],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://wid.cert-bund.de/.well-known/csaf/white/2026/wid-sec-w-2026-2933.json"},{"type":"WEB","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2026-2933"},{"type":"WEB","url":"https://advisory.splunk.com/advisories/SVD-2026-0804"},{"type":"WEB","url":"https://advisory.splunk.com/advisories/SVD-2026-0805"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:63385"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:71179"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:71210"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:59153"},{"type":"WEB","url":"https://www.ibm.com/support/pages/node/7291610"},{"type":"WEB","url":"https://www.ibm.com/support/pages/node/7292374"},{"type":"WEB","url":"https://linux.oracle.com/errata/ELSA-2026-604898.html"},{"type":"WEB","url":"https://www.ibm.com/support/pages/node/7293833"},{"type":"WEB","url":"https://lists.debian.org/debian-security-announce/2026/msg00513.html"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2026:93440"},{"type":"WEB","url":"https://www.ibm.com/support/pages/node/7295132"}]},{"provider":"osv","source_id":"CLSA-2026-1773620214","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1773620214","published_at":"2026-08-04T14:52:12Z","modified_at":"2026-10-15T09:47:46.770794Z","summary":"TuxCare security update for jspdf (2 CVEs)","details":"TuxCare rebuilt jspdf to address 2 CVEs. Fixed in 2.5.2-tuxcare.8.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.5.2-tuxcare.0"},{"fixed":"2.5.2-tuxcare.8"}]}],"versions":["2.5.2","2.5.2-tuxcare.1","2.5.2-tuxcare.2","2.5.2-tuxcare.3","2.5.2-tuxcare.4","2.5.2-tuxcare.5","2.5.2-tuxcare.6","2.5.2-tuxcare.7"],"fixed":["2.5.2-tuxcare.8"],"provider":"osv","source":"CLSA-2026-1773620214","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"CLSA-2026-1775176117","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1775176117","published_at":"2026-08-04T14:52:20Z","modified_at":"2026-10-15T09:45:44.419326Z","summary":"TuxCare security update for jspdf (2 CVEs)","details":"TuxCare rebuilt jspdf to address 2 CVEs. Fixed in 3.0.4-tuxcare.7.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.4-tuxcare.0"},{"fixed":"3.0.4-tuxcare.7"}]}],"versions":["3.0.4","3.0.4-tuxcare.1","3.0.4-tuxcare.2","3.0.4-tuxcare.3","3.0.4-tuxcare.4","3.0.4-tuxcare.5","3.0.4-tuxcare.6"],"fixed":["3.0.4-tuxcare.7"],"provider":"osv","source":"CLSA-2026-1775176117","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"CLSA-2026-1780534264","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1780534264","published_at":"2026-08-04T14:52:35Z","modified_at":"2026-10-15T09:47:50.756486Z","summary":"TuxCare security update for jspdf (12 CVEs)","details":"TuxCare rebuilt jspdf to address 12 CVEs. Fixed in 2.5.1-tuxcare.1.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.5.1-tuxcare.0"},{"fixed":"2.5.1-tuxcare.1"}]}],"versions":["2.5.1"],"fixed":["2.5.1-tuxcare.1"],"provider":"osv","source":"CLSA-2026-1780534264","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"CLSA-2026-1780966320","relation":"upstream","url":"https://osv.dev/vulnerability/CLSA-2026-1780966320","published_at":"2026-08-04T14:52:35Z","modified_at":"2026-10-15T09:47:50.242378Z","summary":"TuxCare security update for jspdf (9 CVEs)","details":"TuxCare rebuilt jspdf to address 9 CVEs. Fixed in 1.4.1-tuxcare.2.","severity":[],"affected":[{"ecosystem":"TuxCare:npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.4.1-tuxcare.0"},{"fixed":"1.4.1-tuxcare.2"}]}],"versions":["1.4.1","1.4.1-tuxcare.1"],"fixed":["1.4.1-tuxcare.2"],"provider":"osv","source":"CLSA-2026-1780966320","relation":"upstream"}],"product_status":[],"references":[]},{"provider":"cvelistv5","source_id":"CVE-2026-31938","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-31938","license":"CC-BY-4.0","published_at":"2026-03-18T03:05:44.964Z","modified_at":"2026-09-07T12:04:46.902Z","summary":"jsPDF has HTML Injection in New Window paths","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L","source":"CVE-2026-31938"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","source":"redhat-SADP:CVE-2026-31938"}],"affected":[{"ecosystem":"CVE","package":"parallax/jsPDF","versions":["< 4.2.1"],"provider":"cvelistv5","source":"CVE-2026-31938","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.1"}]},{"provider":"nvd","source_id":"CVE-2026-31938","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31938","severity":[],"affected":[{"ecosystem":"NVD","package":"parall:jspdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.1"}]}],"fixed":["4.2.1"],"provider":"nvd","source":"CVE-2026-31938","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-wfv2-pwc8-crg5","relation":"self","url":"https://osv.dev/vulnerability/GHSA-wfv2-pwc8-crg5","license":"CC-BY-4.0","published_at":"2026-03-17T17:07:59Z","modified_at":"2026-09-10T03:50:41.577731Z","summary":"jsPDF has HTML Injection in New Window paths","details":"### Impact\n\nUser 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 affected overloads and options are:\n\n* `\"pdfobjectnewwindow\"`: the `pdfObjectUrl` option and the entire options object, which is JSON-serialized and included verbatim in the generated HTML-string.\n* `\"pdfjsnewwindow\"`: the `pdfJsUrl` and `filename` options\n* `\"dataurlnewwindow\"`: the `filename` option\n\nThe 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.\n\nExample attack vector:\n\n```js\nimport { jsPDF } from 'jspdf';\nconst doc = new jsPDF();\n\nconst payload =  'x\\\"></iframe><script>window.__n=1</script><iframe src=\"';\n\ndoc.output('pdfjsnewwindow', {\n  filename: payload,\n  pdfJsUrl: 'viewer.html'\n});\n```\n\n### Patches\nThe vulnerability has been fixed in jspdf@4.2.1.\n\n### Workarounds\nSanitize user input before passing it to the output method.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:L","source":"GHSA-wfv2-pwc8-crg5"}],"affected":[{"ecosystem":"npm","package":"jspdf","purl":"pkg:npm/jspdf","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.2.1"}]}],"fixed":["4.2.1"],"provider":"osv","source":"GHSA-wfv2-pwc8-crg5","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31938"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7"},{"type":"PACKAGE","url":"https://github.com/parallax/jsPDF"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.1"}]},{"provider":"redhat-vex","source_id":"CVE-2026-31938","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-31938","license":"CC-BY-4.0","published_at":"2026-03-18T03:05:44.964Z","modified_at":"2026-08-10T11:00:52.758843Z","summary":"jspdf: jsPDF: Cross site scripting via unsanitized output options","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","source":"CVE-2026-31938"},{"type":"Red Hat","score":"Important","source":"CVE-2026-31938"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.8::el8","status":"fixed","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":["RHSA-2026:7110"],"provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.8","cpe":"cpe:/a:redhat:advanced_cluster_security:4.8::el8","status":"not_affected","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.9","cpe":"cpe:/a:redhat:advanced_cluster_security:4.9::el8","status":"fixed","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":["RHSA-2026:7128"],"provider":"redhat-vex","source":"CVE-2026-31938"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Security 4.9","cpe":"cpe:/a:redhat:advanced_cluster_security:4.9::el8","status":"not_affected","packages":["advanced-cluster-security"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-31938"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31938.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-31938"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2448550"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-31938"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31938"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.1"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5"}]}],"references":[{"type":"WEB","url":"https://github.com/parallax/jsPDF/security/advisories/GHSA-wfv2-pwc8-crg5"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/commit/87a40bbd07e6b30575196370670b41f264aa78d7"},{"type":"WEB","url":"https://github.com/parallax/jsPDF/releases/tag/v4.2.1"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31938"},{"type":"PACKAGE","url":"https://github.com/parallax/jsPDF"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31938.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-31938"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2448550"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-31938"}],"sources":[{"provider":"csaf-bsi","source_id":"WID-SEC-W-2026-2933","url":"https://wid.cert-bund.de/portal/wid/securityadvisory?name=WID-SEC-2026-2933","license":"TLP:CLEAR, mirroring permitted","modified_at":"2026-11-02T23:00:00Z","relation":"upstream"},{"provider":"osv","source_id":"CLSA-2026-1773620214","url":"https://osv.dev/vulnerability/CLSA-2026-1773620214","modified_at":"2026-10-15T09:47:46.770794Z","relation":"upstream"},{"provider":"osv","source_id":"CLSA-2026-1775176117","url":"https://osv.dev/vulnerability/CLSA-2026-1775176117","modified_at":"2026-10-15T09:45:44.419326Z","relation":"upstream"},{"provider":"osv","source_id":"CLSA-2026-1780534264","url":"https://osv.dev/vulnerability/CLSA-2026-1780534264","modified_at":"2026-10-15T09:47:50.756486Z","relation":"upstream"},{"provider":"osv","source_id":"CLSA-2026-1780966320","url":"https://osv.dev/vulnerability/CLSA-2026-1780966320","modified_at":"2026-10-15T09:47:50.242378Z","relation":"upstream"},{"provider":"cvelistv5","source_id":"CVE-2026-31938","url":"https://www.cve.org/CVERecord?id=CVE-2026-31938","license":"CC-BY-4.0","modified_at":"2026-09-07T12:04:46.902Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2026-31938","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31938","relation":"self"},{"provider":"osv","source_id":"GHSA-wfv2-pwc8-crg5","url":"https://osv.dev/vulnerability/GHSA-wfv2-pwc8-crg5","license":"CC-BY-4.0","modified_at":"2026-09-10T03:50:41.577731Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-31938","url":"https://access.redhat.com/security/cve/CVE-2026-31938","license":"CC-BY-4.0","modified_at":"2026-08-10T11:00:52.758843Z","relation":"self"}]}
