Security mailing lists by PureSourceCode

CVE-2025-62366

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.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.

Published
14 Oct 2025
Last modified
8 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Deferred
Weakness
CWE-79
Also known as
GHSA-xw6r-chmh-vpmj
Sources
NVDJSONOSV GHSA-xw6r-chmh-vpmjJSON

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.31 2.0.31

References

History

  • 25 Nov 2026 20:59 UTC · NVD: first stored (published 14 Oct 2025)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 14 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.