Read the docs
TI-2026-18305 Aliases CVE-2026-22787GHSA-w8x4-x68c-m6fc

html2pdf.js has a cross-site scripting vulnerability

Priority HIGH 71CWE-79Published · Updated

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

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.0039 33rd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed html2pdf.js (eKoopmans): 0.14.0html2pdf.js (npm): 0.14.0

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

VendorProductAffected versionsFixed inStatusSource
eKoopmanshtml2pdf.jsbefore 0.14.00.14.0Patch availableCNA
—html2pdf.js (npm)before 0.14.00.14.0Patch availableGHSA-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

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:ekoopmans:html2pdf.js:*:*:*:*:*:node.js:*:*before 0.14.0VulnerableeKoopmans
  • cpe:2.3:a:ekoopmans:html2pdf.js:*:*:*:*:*:node.js:*:* Versions before 0.14.0 Vulnerable ·eKoopmans

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

  1. 2026-10-02 Threatist record created from CVE-2026-22787
  2. 2026-10-03 Alias added: GHSA-w8x4-x68c-m6fc

References

Sources