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
Related Issues
- Vulnogram contains a stored cross-site scripting vulnerability in comment hypertext handling - CVE-2026-32774
- DOMPurify contains a Cross-site Scripting vulnerability - CVE-2026-0540
- DOMPurify contains a Cross-site Scripting vulnerability (GHSA-v8jm-5vwx-cfxm) - CVE-2025-15599
- beautiful-mermaid contains an SVG attribute injection issue that can lead to cross-site scripting (XSS) - CVE-2026-26226
- Tags:
- npm
- html2pdf.js
Anything's wrong? Let us know Last updated on January 21, 2026