CVE-2025-59526
LOW 2.7CVSS 4.0Mailgen: HTML injection vulnerability in plaintext e-mails
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).
- Published
- 22 Sep 2025
- Last modified
- 11 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-j2xj-h7w5-r7vp
- Sources
- NVDJSONOSV GHSA-j2xj-h7w5-r7vpJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | LOW 2.7 | 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/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 |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | mailgen | < 2.0.30 | 2.0.30 |
References
- https://github.com/eladnava/mailgen/commit/741a0190ddae0f408b22ae3b5f0f4c3f5cf4f11d · WEB
- https://github.com/eladnava/mailgen/security/advisories/GHSA-j2xj-h7w5-r7vp · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-59526 · ADVISORY
- https://github.com/eladnava/mailgen · PACKAGE
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 22 Sep 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 22 Sep 2025)