PT-2025-42387 · Mailgen · Mailgen
Published
2025-10-15
·
Updated
2025-10-16
·
CVE-2025-62380
CVSS v4.0
6.3
Medium
| Vector | AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
Name of the Vulnerable Software and Affected Versions
mailgen versions through 2.0.31
Description
mailgen is a Node.js package used to generate responsive HTML emails. A flaw exists in the plaintext email generation process when using the
generatePlaintext method with untrusted input. The code attempts to remove HTML tags using a regular expression and then decodes HTML entities, but certain Unicode line separator characters within tags are not removed. These encoded tags are subsequently decoded into valid HTML, allowing unexpected HTML to remain in the plaintext output. This can lead to the execution of attacker-supplied script in a victim’s browser if the resulting string is processed in a context where HTML is interpreted.Recommendations
Update to version 2.0.32 or later.
Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Mailgen