CVE-2025-59526

Source
https://cve.org/CVERecord?id=CVE-2025-59526
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-59526.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-59526
Aliases
Published
2025-09-22T19:27:53Z
Modified
2026-10-21T02:54:09Z
Severity
  • 2.7 (Low) CVSS_V4 - 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 CVSS Calculator
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).

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":  [
                {
                    "range":  [
                        {
                            "fixed":  "2.0.30"
                        }
                    ],
                    "source":  "AFFECTED_FIELD",
                    "strategy":  "StringRangeExpression"
                }
            ]
        },
        {
            "extracted_events":  [
                {
                    "range":  [
                        {
                            "fixed":  "2.0.30"
                        },
                        {
                            "fixed":  "2.0.30"
                        }
                    ],
                    "source":  "DESCRIPTION"
                }
            ]
        }
    ]
}
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
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "fixed":  "741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        }
    ]
}

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-59526.json"