mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen…
Historical advisory recorded 25 Oct 2026 03:17:29 UTC. Read the latest advisory.
nvd · CVE-2025-62366
Publishedmailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.30 contain an HTML injection vulnerability in plaintext emails produced by the generatePlaintext method when user‑generated content is supplied. The function attempts to remove HTML tags, but if tags are provided as encoded HTML entities they are not removed and are later decoded, resulting in active HTML (for example an img tag with an event handler) in the supposed plaintext output. In contexts where the generated plaintext string is subsequently rendered as HTML, this can allow execution of attacker‑controlled JavaScript. Versions 2.0.31 and later contain a fix. No known workarounds exist.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2025-62366 · CVE overview and exploitation status
nvd · CVE-2025-62366
This historical advisory does not include today's related changes. Open the latest advisory to find current connections.