CVE-2026-22787CWE-79

html2pdf.js has a cross-site scripting vulnerability

High · published January 14, 2026

CVSS v4.0
8.7
EPSS
0%
Percentile
32.0
In the wild
Unconfirmed
What it is

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 [email protected].

The record
Technical detail
CVSS v4.0
8.7 · HIGH
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
EPSS
0.00390 · 32.0th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-01-14T16:52Z
EPSS history
Timeline
  • 14 JAN 16:52Z
    html2pdf.js has a cross-site scripting vulnerability
    cvelistv5