Vulnerabilities/

html2pdf.js contains a cross-site scripting vulnerability

Severity:
High

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:

References

Related Issues

Tags:
npm
html2pdf.js
Anything's wrong? Let us know Last updated on January 21, 2026