{"id":71652,"date":"2025-10-14T19:45:42","date_gmt":"2025-10-14T16:15:42","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-62366-mailgen-vulnerable-to-html-injection-and-cross-site-scripting-via-plaintext-email-generation\/"},"modified":"2025-10-14T19:45:42","modified_gmt":"2025-10-14T16:15:42","slug":"cve-2025-62366-mailgen-vulnerable-to-html-injection-and-cross-site-scripting-via-plaintext-email-generation","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-62366-mailgen-vulnerable-to-html-injection-and-cross-site-scripting-via-plaintext-email-generation\/","title":{"rendered":"CVE-2025-62366 &#8211; Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation"},"content":{"rendered":"<p>CVE ID : CVE-2025-62366<\/p>\n<p>Published :  Oct. 14, 2025, 4:15 p.m. | 24\u00a0minutes ago<\/p>\n<p>Description : mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.30 contain an HTML injection vulnerability in plaintext emails produced by the generatePlaintext method when user\u2011generated content is supplied. The function attempts to remove HTML tags, but if tags are provided as encoded HTML entities they are not removed and are later decoded, resulting in active HTML (for example an img tag with an event handler) in the supposed plaintext output. In contexts where the generated plaintext string is subsequently rendered as HTML, this can allow execution of attacker\u2011controlled JavaScript. Versions 2.0.31 and later contain a fix. No known workarounds exist.<\/p>\n<p>Severity: 2.9 | LOW<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-62366 Published : Oct. 14, 2025, 4:15 p.m. | 24\u00a0minutes ago Description : mailgen is a Node.js package that generates responsive HTML e-mails for sending transactional mail. Mailgen versions through 2.0.30 contain an HTML injection vulnerability in plaintext emails produced by the generatePlaintext method when user\u2011generated content is supplied. The function attempts &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-71652","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71652","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=71652"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/71652\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=71652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=71652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=71652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}