SecurityContext

CVE-2025-62380: Mailgen - Stored XSS

  • Cve: CVE-2025-62380
  • Name: Mailgen - Stored XSS
  • Description: mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.31 contain an HTML injection vulnerability in plaintext emails generated with the generatePlaintext method when user generated content is supplied. The plaintext generation code attempts to strip HTML tags using a regular expression and then decodes HTML entities, but tags that include certain Unicode line separator characters are not matched and removed. These encoded tags are later decoded into valid HTML content, allowing unexpected HTML to remain in output intended to be plaintext. 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. Version 2.0.32 fixes the issue.
  • Impact: Attackers can execute scripts in victim browsers via crafted plaintext emails, leading to potential account compromise or data theft.
  • Remediation: Upgrade to version 2.0.32 or later.
  • Vulnerability type: stored_xss
  • Vulnerability impact: stored_xss
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: low
  • Cvss score: 2.9
  • Cvss vector: 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Epss score: 0.00452
  • Epss percentile: 0.40061
  • Assignee: [email protected]
  • Published at: 2025-10-15T17:16:00Z
  • Age in days: 405
  • Modified at: 2026-10-08T11:10:00Z
  • References total: 2
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-62380
  • Nvd status: deferred
  • Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, products total, products, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-79Improper Neutralization of Input During Web Page Generation

References

UrlSourceTags
https://github.com/eladnava/mailgen/commit/7a791a424ff3a3f7783f8750919f1e98639924a8nvd
https://github.com/eladnava/mailgen/security/advisories/GHSA-q4w9-x3rv-4c8jnvd

Projects

RepositoryLink kindsIndexedUrl
eladnava/mailgencommit, fix, package, security_advisoryyes/v1/repositories/eladnava/mailgen

Index

  • Repositories: 3
  • Repositories high signal: 3
  • Packages: 1

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts