html2pdf.js has a cross-site scripting vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- High · High · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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 [email protected].
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| eKoopmans | html2pdf.js | before 0.14.0 | 0.14.0 | Patch available | CNA |
| — | html2pdf.js (npm) | before 0.14.0 | 0.14.0 | Patch available | GHSA-w8x4-x68c-m6fc |
- html2pdf.js VendoreKoopmans Affected before 0.14.0 Fixed in 0.14.0 Patch available CNA
- html2pdf.js (npm) Vendor— Affected before 0.14.0 Fixed in 0.14.0 Patch available GHSA-w8x4-x68c-m6fc
Remediation
- Fix · CNA html2pdf.js (eKoopmans) Fixed in 0.14.0
- Fix · GHSA-w8x4-x68c-m6fc html2pdf.js (npm) Fixed in 0.14.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-22787
- 2026-10-03 Alias added: GHSA-w8x4-x68c-m6fc
References
Patch 3
Sources
- CVE-2026-22787 · CVE Program
- CVE-2026-22787 · NVD
- FIRST EPSS
- GHSA-w8x4-x68c-m6fc · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences