Skip to main content
VulnerabilityPublished

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

Affects eladnava mailgenSource CVE Database V5

0

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

Data as of 26 Oct 2026, 17:16 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 36% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 2.0.31
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 14 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.31.

Affected software

ProductAffectedFixed in
eladnava mailgenAffected
  • <2.0.31
Fixed in
  • 2.0.31

AI-suggested

The primary mitigation is to upgrade mailgen to version 2.0.31 or later, where the vulnerability is fixed. Organizations should audit their use of mailgen to identify any instances of the generatePlaintext method and verify how the plaintext output is rendered or processed downstream. Avoid rendering plaintext emails as HTML or in any context that interprets HTML tags. Implement strict input validation and sanitization on user-generated content before passing it to mailgen. Employ Content Security Policy (CSP) headers in webmail or email client interfaces to restrict script execution. Conduct security reviews of email processing pipelines to detect and neutralize encoded HTML entities. Monitor for unusual email activity or phishing attempts leveraging this vulnerability. Finally, maintain an inventory of Node.js dependencies and apply timely updates to reduce exposure to similar vulnerabilities.

Description

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.

References

Community reviews

Loading reviews…