Skip to main content
VulnerabilityPublished

CVE-2025-62380: eladnava mailgen · Cross-site Scripting

Affects eladnava mailgenSource CVE Database V5

0

Public exploit available · CVSS 2.9 Low : upgrade to 2.0.32 as a priority.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 4.0 base score
2.9Low
How severe the flaw is on the 0–10 CVSS scale.
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:P

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 15 Oct 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: evidence found.

    CVSS exploit maturity: proof of concept public

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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), CVSS vector, the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade eladnava mailgen to 2.0.32.

Affected software

ProductAffectedFixed in
npmmailgenpkg:npm/mailgenOther threatsAffected
  • <2.0.32
Fixed in
  • 2.0.32

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.

References

Community reviews

Loading reviews…