Skip to main content
VulnerabilityPublished Updated

CVE-2026-22787: eKoopmans html2pdf.js · Cross-site Scripting

Affects eKoopmans html2pdf.jsSource CVE Database V5

0

Not known to be exploited · CVSS 8.7 High : upgrade to 0.14.0 soon.

Data as of 26 Oct 2026, 15:59 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 32% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.14.0
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

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 14 Jan 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade eKoopmans html2pdf.js to 0.14.0.

Affected software

ProductAffectedFixed in
eKoopmanshtml2pdf.jsAffected
  • <0.14.0
Fixed in
  • 0.14.0
npmhtml2pdf.jspkg:npm/html2pdf.jsOther threatsAffected
  • <0.14.0
Fixed in
  • 0.14.0

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Immediately upgrade all instances of html2pdf.js to version 0.14.0 or later to ensure the vulnerability is patched.
  2. Conduct an inventory of web applications and services to identify usage of html2pdf.js, especially those accepting user-generated text inputs.
  3. Implement Content Security Policy (CSP) headers to restrict script execution and reduce the impact of potential XSS attacks.
  4. Sanitize and validate all user inputs at the application level before passing them to client-side libraries, employing robust libraries or frameworks for input validation.
  5. Educate developers on secure usage of third-party libraries and the risks of injecting unsanitized text into the DOM.
  6. Monitor web application logs and user reports for suspicious activity indicative of XSS exploitation attempts.
  7. Employ runtime application self-protection (RASP) or web application firewalls (WAF) with XSS detection capabilities as an additional layer of defense.
  8. Review and update incident response plans to include scenarios involving client-side script injection attacks.

Description

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.

References

Community reviews

Loading reviews…