CVE-2024-26151: FelixSchwarz/mjml-python - Stored XSS
- Cve: CVE-2024-26151
- Name: FelixSchwarz/mjml-python - Stored XSS
- Description: The `mjml` PyPI package, found at the `FelixSchwarz/mjml-python` GitHub repo, is an unofficial Python port of MJML, a markup language created by Mailjet. All users of `FelixSchwarz/mjml-python` who insert untrusted data into mjml templates unless that data is checked in a very strict manner. User input like `<script>` would be rendered as `<script>` in the final HTML output. The attacker must be able to control some data which is later injected in an mjml template which is then send out as email to other users. The attacker could control contents of email messages sent through the platform. The problem has been fixed in version 0.11.0 of this library. Versions before 0.10.0 are not affected by this security issue. As a workaround, ensure that potentially untrusted user input does not contain any sequences which could be rendered as HTML.
- Impact: Attackers can inject malicious scripts into emails, potentially leading to cross-site scripting attacks on email recipients.
- Remediation: Update to version 0.11.0 or later. As a workaround, sanitize user input to remove HTML or script sequences before injecting into templates.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: user_interaction
- Requirements: Attacker needs to control user input injected into email templates
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.00621
- Epss percentile: 0.50707
- Assignee: [email protected]
- Published at: 2024-02-22T19:15:09Z
- Age in days: 1006
- Modified at: 2026-06-17T07:17:12Z
- Patch available: yes
- Public exploits total: 2
- References total: 6
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-26151
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-20 | Improper Input Validation |
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/FelixSchwarz/mjml-python/issues/52 | nvd | 2024-02-22 |
| https://www.vicarius.io/vsociety/posts/cve-2024-26151-mjml-python-vulnerability-1 | nvd | 2024-02-22 |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| felixschwarz:mjml-python | = 0.10.0 | no | nvd | /v1/products/felixschwarz/mjml-python |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| FelixSchwarz/mjml-python | commit, fix, issues, package, releases, security_advisory | yes | /v1/repositories/FelixSchwarz/mjml-python |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 2
- Public exploit first date: 2024-02-22
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts