HTML Injection Vulnerability in Mailgen Node.js Package
CVE-2025-62366
2.9LOW
What is CVE-2025-62366?
The Mailgen Node.js package, designed for creating responsive HTML emails, is susceptible to an HTML injection vulnerability in its generatePlaintext method. When user-generated content includes encoded HTML entities, the function fails to strip these entities, leading to unintentional execution of injected JavaScript during rendering. This vulnerability poses a significant risk, especially when the plaintext output is subsequently displayed as HTML. Users of Mailgen versions prior to 2.0.31 are strongly encouraged to upgrade as the newer version contains patches to mitigate this risk. No known workarounds are available.
Affected Version(s)
mailgen < 2.0.31