{"id":"CVE-2025-59526","aliases":["GHSA-j2xj-h7w5-r7vp"],"url":"https://o3.security/vulnerability/CVE-2025-59526","summary":"Mailgen: HTML injection vulnerability in plaintext e-mails","details":"mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Prior to version 2.0.30, 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. This vulnerability has been patched in version 2.0.30. A workaround involves stripping all HTML tags before passing any content into Mailgen.generatePlaintext(email).","published":"2025-09-22T19:27:53.323Z","modified":"2026-07-15T01:49:05.151069632Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"mailgen","fixedVersion":"2.0.30"}],"fix":{"url":"https://github.com/eladnava/mailgen/commit/741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d","label":"eladnava/mailgen@741a019"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59526.json"},{"type":"ADVISORY","url":"https://github.com/eladnava/mailgen/security/advisories/GHSA-j2xj-h7w5-r7vp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59526"},{"type":"FIX","url":"https://github.com/eladnava/mailgen/commit/741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:05.151069632Z"}}