{"id":"CVE-2025-62366","revision":"cb12702b86f34ac291639e099d319695","records":[{"revision":"cb12702b86f34ac291639e099d319695","observedAt":"2026-10-25T03:17:29.935+00:00","statement":{"source":"nvd","id":"CVE-2025-62366","aliases":[],"title":"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 us…","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‑generated 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‑controlled JavaScript. Versions 2.0.31 and later contain a fix. No known workarounds exist.","state":0,"publishedAt":"2025-10-14T16:15:42.17+00:00","modifiedAt":"2026-10-08T11:10:00.25+00:00","affected":[],"metrics":[{"system":"CVSS 4.0 · security-advisories@github.com · Secondary","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","score":2.9,"severity":"LOW"}],"references":["https://github.com/eladnava/mailgen/commit/7279a983481d05c51aa451e86146f98aaa42fee9","https://github.com/eladnava/mailgen/security/advisories/GHSA-xw6r-chmh-vpmj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-62366","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-79"],"productCriteria":[],"sourceDates":{"published":"2025-10-14T16:15:42.170","lastModified":"2026-10-08T11:10:00.250"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-62366","identifiers":["CVE-2025-62366"]},"retained":false,"historicalAffected":[]}],"coverage":[]}