Skip to content

Potentially untrusted input is rendered as HTML in final output

High
FelixSchwarz published GHSA-578p-fxmm-6229 Feb 22, 2024

Package

pip mjml-python (pip)

Affected versions

0.10.0

Patched versions

0.11.0

Description

Impact

All users of mjml-python who insert untrusted data into mjml templates unless that data is checked in a very strict manner. User input like &lt;script&gt; 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.

Patches

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 which was added as part of commit 84c495d.

Workarounds

  • Ensure that potentially untrusted user input does not contain any sequences which could be rendered as HTML.

References

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
High
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L

CVE ID

CVE-2024-26151

Weaknesses

No CWEs

Credits