CVE-2025-62380

Mailgen has HTML Injection and XSS Filter Bypass in Plaintext Emails

LOW
2.9
CVSS Score
Published: October 15, 2025 at 04:52 PM UTC
Updated: October 8, 2026 at 11:10 AM UTC
1 product affected across 1 vendorMailgen

Using mailgen by eladnava?

Get instant alerts when new vulnerabilities affect mailgen - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
LOW2.9
Exploit prediction
EPSS 0.5%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.0.32
Affected range stops below 2.0.32, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

2.9LOWGitHub_M
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card