CVE-2025-62380
JavaScript vulnerability analysis and mitigation

Overview

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

Technical details

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

Impact

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

Mitigation and workarounds

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

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-62410CRITICAL9.4
  • JavaScriptJavaScript
  • happy-dom
NoYesOct 15, 2025
CVE-2025-62381HIGH8.3
  • JavaScriptJavaScript
  • sveltekit-superforms
NoYesOct 15, 2025
CVE-2025-62374MEDIUM6.4
  • JavaScriptJavaScript
  • parse
NoYesOct 14, 2025
CVE-2025-62378MEDIUM6.1
  • JavaScriptJavaScript
  • commandkit
NoYesOct 15, 2025
CVE-2025-62380LOW2.9
  • JavaScriptJavaScript
  • mailgen
NoYesOct 15, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management