CVE-2025-62380: eladnava mailgen · Cross-site Scripting
Affects eladnava mailgenSource CVE Database V5
Not known to be exploited · CVSS 2.9 Low : upgrade to 2.0.32 when convenient.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 39% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.0.32
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:PExploitation evidence
Disclosed: evidence found.
CVE published 15 Oct 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Upgrade eladnava mailgen to 2.0.32.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
npmmailgenpkg:npm/mailgenOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should immediately update mailgen to version 2.0.32 or later to ensure the vulnerability is patched. Additionally, developers should implement strict input validation and sanitization on all user-generated content before passing it to mailgen’s generatePlaintext method. Avoid rendering plaintext email outputs in contexts where HTML is interpreted; treat plaintext strictly as plain text. Employ Content Security Policy (CSP) headers in webmail or email client interfaces to restrict script execution and mitigate potential XSS impacts. Conduct code reviews and security testing focused on email generation and rendering workflows to detect similar injection issues. Monitor email rendering environments for unusual script execution or anomalies. Finally, educate development teams about the risks of improper input handling in email generation libraries and encourage timely dependency updates.
Description
mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.31 contain an HTML injection vulnerability in plaintext emails generated with the generatePlaintext method when user generated content is supplied. The plaintext generation code attempts to strip HTML tags using a regular expression and then decodes HTML entities, but tags that include certain Unicode line separator characters are not matched and removed. These encoded tags are later decoded into valid HTML content, allowing unexpected HTML to remain in output intended to be plaintext. Projects are affected if they call Mailgen.generatePlaintext with untrusted input and then render or otherwise process the returned string in a context where HTML is interpreted. This can lead to execution of attacker supplied script in the victim’s browser. Version 2.0.32 fixes the issue.