CVE-2026-22787 json
html2pdf.js has a cross-site scripting vulnerability
published 2026-01-14 9 mo ago modified 2026-06-17 4 mo ago also GHSA-w8x4-x68c-m6fc , EUVD-2026-2450
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm html2pdf.js 0.14.0
- ekoopmans html2pdf.js 0.14.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 9 mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- aydinnyunus.github.io https://aydinnyunus.github.io/2026/01/17/cve-2026-22787-html2pdf-xss-vulnerability/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.7 | 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 |
| CNA | 4.0 | 8.7 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | html2pdf.js | <0.14.0 |
0.14.0 |
Affected products
- eKoopmans html2pdf.js
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/eKoopmans/html2pdf.js/pull/877
web, issue-tracking, patch
-
github.com
/eKoopmans/html2pdf.js/commit/988826e336035b39a8608182d7b73c0e3cd78c7b
web, patch
-
github.com
/eKoopmans/html2pdf.js/security/advisories/GHSA-w8x4-x68c-m6fc
web, patch, vendor-advisory
-
aydinnyunus.github.io
/2026/01/17/cve-2026-22787-html2pdf-xss-vulnerability/
exploit, mitigation, third-party-advisory
-
github.com
/eKoopmans/html2pdf.js/issues/865
web, issue-tracking
-
github.com
/eKoopmans/html2pdf.js/releases/tag/v0.14.0
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-22787
advisory
-
aydinnyunus.github.io
/2026/01/17/cve-2026-22787-html2pdf-xss-vulnerability
web
-
github.com
/eKoopmans/html2pdf.js
package
Sources
- CVE List CVE-2026-22787
- GitHub Advisory GHSA-w8x4-x68c-m6fc
- NVD CVE-2026-22787
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.