CVE-2025-62366

Source
https://cve.org/CVERecord?id=CVE-2025-62366
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-62366.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-62366
Aliases
Published
2025-10-14T15:23:47.600Z
Modified
2026-04-02T12:57:45.263574Z
Severity
  • 2.9 (Low) CVSS_V4 - 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 CVSS Calculator
Summary
Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/62xxx/CVE-2025-62366.json",
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/eladnava/mailgen

Affected ranges

Type
GIT
Repo
https://github.com/eladnava/mailgen
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-62366.json"
unresolved_ranges
[
    {
        "events": [
            {
                "introduced": "0"
            },
            {
                "last_affected": "2.0.30"
            }
        ]
    }
]