
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-62380 affects mailgen, a Node.js package that generates responsive HTML e-mails for sending transactional mail. The vulnerability was discovered in versions through 2.0.31 and involves an HTML injection vulnerability in plaintext emails generated with the generatePlaintext method when user-generated content is supplied. The issue was discovered and reported by Edoardo Ottavianelli (@edoardottt) and has been fixed in version 2.0.32 (GitHub Advisory).
The vulnerability stems from a flaw in the plaintext generation code that attempts to strip HTML tags using a regular expression and then decodes HTML entities. The issue occurs because tags containing certain Unicode line separator characters are not matched and removed by the regular expression. These encoded tags are later decoded into valid HTML content, allowing unexpected HTML to remain in output intended to be plaintext. The vulnerability has been assigned a CVSS 4.0 score of 2.9 (LOW) with the vector string CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P and is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation) (NVD).
Projects are affected if they call Mailgen.generatePlaintext with untrusted input and then render or otherwise process the returned string in a context where HTML is interpreted. This can lead to execution of attacker-supplied script in the victim's browser, potentially resulting in the theft of secrets or sensitive information contained in the message (GitHub Advisory).
The vulnerability has been fixed in version 2.0.32 of mailgen. Users should upgrade to this version or later to address the security issue (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."