CVE-2024-26151 json
Potentially untrusted input is rendered as HTML in final output
published 2024-02-22 2 y ago modified 2026-09-10 1 mo ago also GHSA-578p-fxmm-6229 , PYSEC-2026-1631 , EUVD-2024-0518
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.6%
- EPSS 0.6% chance of exploitation in 30 days, percentile 50%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi mjml 0.11.0
- FelixSchwarz mjml-python 0.11.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.62% chance of exploitation in the next 30 days, higher than 50% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/FelixSchwarz/mjml-python/issues/52 referenced PoC, tagged "exploit" by a source, unverified
- vicarius.io https://www.vicarius.io/vsociety/posts/cve-2024-26151-mjml-python-vulnerability-1 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L |
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L |
| GitHub | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | mjml | >=0.10.0, <0.11.0 |
0.11.0 |
Affected products
- FelixSchwarz mjml-python
Classification
References
-
github.com
/FelixSchwarz/mjml-python/commit/84c495da20a91640a1ca551ace17df7f3be644aa
web, patch
-
github.com
/FelixSchwarz/mjml-python/commit/8d410b7a500703080bb14ed7e3d2663fe16767e6
web, patch
-
github.com
/FelixSchwarz/mjml-python/issues/52
web, exploit, issue-tracking
-
vicarius.io
/vsociety/posts/cve-2024-26151-mjml-python-vulnerability-1
exploit, third-party-advisory
-
github.com
/FelixSchwarz/mjml-python/security/advisories/GHSA-578p-fxmm-6229
web, vendor-advisory
-
github.com
/FelixSchwarz/mjml-python/releases/tag/v0.11.0
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2024-26151
advisory
-
github.com
/FelixSchwarz/mjml-python
package
-
pypi.org
/project/mjml
package
-
github.com
/advisories/GHSA-578p-fxmm-6229
advisory
Sources
- CVE List CVE-2024-26151
- GitHub Advisory GHSA-578p-fxmm-6229
- NVD CVE-2024-26151
- OSV PYSEC-2026-1631
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.