Security mailing lists by PureSourceCode

CVE-2025-62380

LOW 2.9CVSS 4.0

Mailgen has HTML Injection and XSS Filter Bypass in Plaintext Emails

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.

Published
15 Oct 2025
Last modified
8 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-79
Also known as
GHSA-q4w9-x3rv-4c8j
Sources
NVDJSONOSV GHSA-q4w9-x3rv-4c8jJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 4.0 LOW 2.9 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
OSV GitHub CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV npm mailgen < 2.0.32 2.0.32

References

History

  • 25 Nov 2026 20:59 UTC · NVD: first stored (published 15 Oct 2025)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 15 Oct 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.