What’s Vulnerable › Vulnerabilities
CVE-2025-59526: Mailgen: HTML injection vulnerability in plaintext e-mails
- Severity: low (CVSS 2.7 v4.0)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-09-22 · updated 2026-10-11
- Weakness: CWE-79
Description
mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Prior to version 2.0.30, there is an HTML injection vulnerability in plaintext e-mails generated by Mailgen. Projects are affected if the Mailgen.generatePlaintext(email) method is used and given user-generated content. This vulnerability has been patched in version 2.0.30. A workaround involves stripping all HTML tags before passing any content into Mailgen.generatePlaintext(email).
Affected products
- eladnava mailgen: before 2.0.30
References
- https://github.com/eladnava/mailgen/commit/741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d
- https://github.com/eladnava/mailgen/security/advisories/GHSA-j2xj-h7w5-r7vp
Get alerted when CVE-2025-59526 or the next vulnerability affects your stack