CVE-2025-62366CWE-79cross-site-scripting

CVE-2025-62366

published October 14, 2025

CVSS
2.9
EPSS
0%
Percentile
36.0
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
2.9 · NONE
CVSS v4.0
Not supplied
EPSS
0.00428 · 36.0th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2025-10-14T20:15Z
References (2)
EPSS history
Timeline
  • 14 OCT 15:23Z
    Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation
    cvelistv5