Skip to content

CVE-2025-59526 Mailgen: HTML injection vulnerability in plaintext e-mails

LowCVSS 2.7 EPSS 0.44%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial

Description

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

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm mailgen(npm) < 2.0.30 2.0.30 Fixed
eladnava mailgen = < 2.0.30 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm mailgen(npm) < 2.0.30 2.0.30
eladnava mailgen = < 2.0.30 No fix listed

References