{"id":"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).","aliases":["GHSA-j2xj-h7w5-r7vp"],"modified":"2026-08-12T03:51:11.576460796Z","published":"2025-09-22T19:27:53.323Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-79"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59526.json","unresolved_ranges":[{"extracted_events":[{"fixed":"2.0.30"}],"source":"AFFECTED_FIELD"}]},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/eladnava/mailgen","events":[{"introduced":"0"},{"fixed":"741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d"}],"database_specific":{"source":"REFERENCES"}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-59526.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:L/E:U"}]}