Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| eladnava | mailgen | affected |
|
No data.
No data.
| Vendor | Product | Versions |
|---|---|---|
| Mailgen | Mailgen | — |
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-xw6r-chmh-vpmj | Mailgen has HTML Injection and XSS Filter Bypass in Plaintext Emails |
No CVSS v3.1
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.748% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Mailgen
Mailgen mailgen |
|
| Vendors & Products |
Mailgen
Mailgen mailgen |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Mailgen vulnerable to HTML injection and cross-site scripting via plaintext email generation | |
| Weaknesses | CWE-79 | |
| References |
| |
| Metrics |
cvssV4_0
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')