Improper Control of Generation of Code ('Code Injection') Affecting ethyca-fides package, versions [2.19.0,2.44.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (20th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-ETHYCAFIDES-7897504
  • published5 Sept 2024
  • disclosed4 Sept 2024
  • creditgrmpyninja

Introduced: 4 Sep 2024

CVE-2024-45053  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade ethyca-fides to version 2.44.0 or higher.

Overview

ethyca-fides is an Open-source ecosystem for data privacy as code.

Affected versions of this package are vulnerable to Improper Control of Generation of Code ('Code Injection') due to improper input sanitization and lack of rendering environment restrictions in the Email Templating feature. An attacker can execute arbitrary code on the server by injecting malicious templates.

Note:

This is only exploitable if the attacker has Owner or Contributor role access.

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.

PoC

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*

References

CVSS Scores

version 4.0
version 3.1