cve.bz

CVE-2025-59526

2.7 lowEPSS 0.4%

mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Prior to version 2.0.30, there is an HTML injection vulnerability in plaintext e-mails generated by Mailgen. Projects are affected if the Mailgen.generatePlaintext(email) method is used and given user-generated content. This vulnerability has been patched in version 2.0.30. A workaround involves stripping all HTML tags before passing any content into Mailgen.generatePlaintext(email).

CVSS 4.0
2.7CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:L/E:U
EPSS
0.4% chance of exploitation in the next 30 days; higher than 37% of CVEs (scores of 2026-10-25)
CWE
CWE-79
Published
Modified
Record from
the NVD, synced

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-j2xj-h7w5-r7vpnpmmailgen<2.0.302.0.30

References

Check your stackJSON