{"cve":"CVE-2025-62380","nvd":{"published":"2025-10-15T17:16:00.480","modified":"2026-10-08T11:10:00.250","status":"Deferred","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.","cvss_v4":{"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","score":2.9},"cvss_v3":null,"cwes":["CWE-79"],"references":["https://github.com/eladnava/mailgen/commit/7a791a424ff3a3f7783f8750919f1e98639924a8","https://github.com/eladnava/mailgen/security/advisories/GHSA-q4w9-x3rv-4c8j"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:12:35.277909958+00:00"},"epss":{"cve":"CVE-2025-62380","score":0.00452,"percentile":0.39031,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-q4w9-x3rv-4c8j","url":"https://osv.dev/vulnerability/GHSA-q4w9-x3rv-4c8j","summary":"Mailgen has HTML Injection and XSS Filter Bypass in Plaintext Emails","modified":"2025-10-16T07:57:36.093474Z","packages":[{"ecosystem":"npm","name":"mailgen","purl":"pkg:npm/mailgen","ranges":["<2.0.32"],"fixed":["2.0.32"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}