CVE-2025-62366Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation
Updated under an hour ago ()
Does this affect you?
It affects eladnava mailgen. Add what you run to find out whether that includes you.
No exploitation reported and no EPSS estimate yet.
Do this next
Free account, 1 product
mailgen 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.
- CVSS
- 2.9 LOW (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P
- Weakness (CWE)
- CWE-79
- Known exploited
- Not in CISA's KEV catalog
- EPSS (exploitation in the next 30 days)
- Not loaded for this CVE
- Assigned by
- GitHub_M
- NVD analysis
- Deferred
- Record last updated
- Oct 14, 2025
- First seen by InfoSec Signals
- Oct 9, 2026
Affected products
eladnava mailgen eladnava:mailgen (from the name) | before 2.0.31 | CNA record |
References
- https://github.com/eladnava/mailgen/security/advisories/GHSA-xw6r-chmh-vpmjx-refsource-confirm
- https://github.com/eladnava/mailgen/commit/7279a983481d05c51aa451e86146f98aaa42fee9x-refsource-misc
The CVE record on cve.org NVD's entry
The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.