Skip to main content

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

CVE-2025-59526

Severity Low
Score 2.7/10

Summary

mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. In versions through 2.0.29, 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. A workaround involves stripping all HTML tags before passing any content into "Mailgen.generatePlaintext(email)".

  • LOW
  • NETWORK
  • NONE
  • NONE

CWE-79 - Cross Site Scripting

Cross-Site Scripting, commonly referred to as XSS, is the most dominant class of vulnerabilities. It allows an attacker to inject malicious code into a pregnable web application and victimize its users. The exploitation of such a weakness can cause severe issues such as account takeover, and sensitive data exfiltration. Because of the prevalence of XSS vulnerabilities and their high rate of exploitation, it has remained in the OWASP top 10 vulnerabilities for years.

Advisory Timeline

  • Published