{"id":"CVE-2026-22787","published":"2026-01-14T16:52:38Z","modified":"2026-01-20T18:37:09Z","title":"html2pdf.js has a cross-site scripting vulnerability","vendor":"eKoopmans","product":"html2pdf.js","tier":"tail","description":{"text":"html2pdf.js converts any webpage or element into a printable PDF entirely client-side. Prior to 0.14.0, html2pdf.js contains a cross-site scripting (XSS) vulnerability when given a text source rather than an element. This text is not sufficiently sanitized before being attached to the DOM, allowing malicious scripts to be run on the client browser and risking the confidentiality, integrity, and availability of the page's data. This vulnerability has been fixed in html2pdf.js@0.14.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0039,"percentile":0.34045,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/eKoopmans/html2pdf.js/security/advisories/GHSA-w8x4-x68c-m6fc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/eKoopmans/html2pdf.js/issues/865","tags":["x_refsource_MISC"]},{"url":"https://github.com/eKoopmans/html2pdf.js/pull/877","tags":["x_refsource_MISC"]},{"url":"https://github.com/eKoopmans/html2pdf.js/commit/988826e336035b39a8608182d7b73c0e3cd78c7b","tags":["x_refsource_MISC"]},{"url":"https://github.com/eKoopmans/html2pdf.js/releases/tag/v0.14.0","tags":["x_refsource_MISC"]},{"url":"https://aydinnyunus.github.io/2026/01/17/cve-2026-22787-html2pdf-xss-vulnerability/","tags":[]}],"priority":{"score":12.9,"factors":[{"name":"EPSS percentile","points":6.81},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"ekoopmans","affectedVersions":[{"vendor":"eKoopmans","product":"html2pdf.js","versions":["< 0.14.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-01-14T21:02:44.599277Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"html2pdf.js","vulnerableRanges":["<0.14.0"],"patched":["0.14.0"],"from":["GHSA-w8x4-x68c-m6fc"],"provenance":"source"}],"summary":{"text":"html2pdf.js, a client-side library from eKoopmans that converts webpages or elements into PDFs, contains a cross-site scripting flaw in versions prior to 0.14.0 when it is passed a text source rather than an element, because that text is not sufficiently sanitized before being attached to the DOM. An unauthenticated remote attacker can exploit this by getting a victim to interact with the page (user interaction required), causing malicious scripts to run in the victim's browser and potentially compromising the confidentiality and integrity of the page's data, with limited availability impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:42:26Z"},"euvd":{"id":"EUVD-2026-2450","exploited":false,"provenance":"source"}}