CVE-2026-22787Ekoopmans Html2pdf.js
High 8.7 No auth needed
Follow: this CVE · Ekoopmans · Ekoopmans Html2pdf.js We alert you by email or Slack (account required).
- Priority
- 67
- CVSS 4.0
- 8.7
- EPSS
- —
- Auth required
- No
- Published
- Jan 14, 2026
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- 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/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
What happens
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.
What to do
- Apply the vendor's security update for Html2pdf.js.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | html2pdf.js |
< 0.14.0 |
0.14.0 |
npm install html2pdf.js@0.14.0 |
Per OSV / GitHub Advisories (GHSA-w8x4-x68c-m6fc). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ekoopmans | html2pdf.js | < 0.14.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Issue Tracking
- github.com Issue Tracking Patch
- github.com Release Notes
- github.com Patch Vendor Advisory
- aydinnyunus.github.io Exploit Mitigation Third Party Advisory