PT-2025-39071 · Mailgen · Mailgen

Published

2025-09-21

·

Updated

2025-09-23

·

CVE-2025-59526

CVSS v3.1

5.3

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Name of the Vulnerable Software and Affected Versions mailgen versions prior to 2.0.30
Description mailgen is a Node.js package used to generate responsive HTML e-mails. A HTML injection flaw exists in plaintext e-mails generated by the software when using the Mailgen.generatePlaintext(email) method with user-provided content. The issue allows for potential injection of HTML code into generated e-mails. A workaround involves removing all HTML tags from content before using it with the Mailgen.generatePlaintext(email) function.
Recommendations Update to version 2.0.30 or later. Strip all HTML tags from content before passing it to the Mailgen.generatePlaintext(email) function.

Exploit

Fix

XSS

Weakness Enumeration

Related Identifiers

BDU:2025-16482
CVE-2025-59526
GHSA-J2XJ-H7W5-R7VP

Affected Products

Mailgen