Vulnerability library
Security checkJanuary 21, 2026

html2pdf.js contains a cross-site scripting vulnerability

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmhtml2pdf.js

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the html2pdf.js package to the latest compatible version. Followings are version details:

  • Affected version(s): < 0.14.0
  • Patched version(s): 0.14.0

References

Could your website be exposed too?

SmartScanner can check your website for html2pdf.js contains a cross-site scripting vulnerability and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated January 21, 2026