p PatchFirst

CVE-2025-59526

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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 2.7 · Low · EPSS 0.4% · Fix available

Published
Updated

Stack: node

Affected products and versions

  • mailgen

    Versions
    • < 2.0.30: Affected

    No fix published

  • mailgen npm

    Affected ranges
    • SEMVER: < 2.0.30

    Update to 2.0.30

Original sources

Check your server →