CVE-2024-34715: Ethyca fides Fides Webserver Logs Hosted Database Vulnerability

LOW
Advisory Identifier: GHSA-8cm5-jfj2-26q7
CVSS 2.3
CWE-116 CWE-532
Published
Advisory Summary

CVE-2024-34715 is a LOW (CVSS 2.3) fides webserver logs hosted database vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Ethyca fides libraries in the PyPI ecosystem. The issue involves fides webserver logs hosted database password partial exposure vulnerability. Remediation is available by upgrading affected packages to version 2.37.0.

CVE-2024-34715 at a Glance

CVE Identifier CVE-2024-34715
GHSA Identifier GHSA-8cm5-jfj2-26q7
Severity LOW
CVSS v3.1 Base Score 2.3
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Ethyca fides
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 2.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-34715

To remediate this vulnerability, upgrade all affected Ethyca fides dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ethyca-fides fixed: 2.37.0
pip install ethyca-fides>=2.37.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ethyca-fides

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-34715, inspect your installed packages using pip:

pip show ethyca-fides

Analyze the terminal output to locate any version of Ethyca fides in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.37.0), your application is affected.

Note: The pip show ethyca-fides command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Ethyca fides, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The Fides webserver requires a connection to a hosted PostgreSQL database for persistent storage of application data. If the password used by the webserver for this database connection includes special characters such as `@` and `$`, webserver startup fails and the part of the password following the special character is exposed in webserver error logs. This is caused by improper escaping of the SQLAlchemy password string, see [here](https://docs.sqlalchemy.org/en/14/core/engines.html#escaping-special-characters-such-as-signs-in-passwords) and [here](https://github.com/sqlalchemy/sqlalchemy/discussions/6615) for more info. ### Impact Partial exposure of hosted database password in webserver logs ### Patches The vulnerability has been patched in Fides version `2.37.0`. Users are advised to upgrade to this version or later to secure their systems against this threat. ### Workarounds There are no workarounds. ### Proof of Concept 1. Create a hosted PostgreSQL database for Fides with a password including `@` or `$` e.g. `p@ssword` 2. Run Fides and observe failure, sample log attached ``` fides | 2024-02-28 14:27:52.609 | ERROR | fides.api.db.database:configure_db:117 - Unable to configure database: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "ssword@fides-db" to address: Name or service not known ```

CVE-2024-34715 Affected Ethyca fides Versions

1 component(s)
Fixed Versions:
2.37.0
Product / Package Ecosystem Affected Versions Fixed Version
ethyca-fides
PyPI
< 2.37.0
2.37.0

References

Frequently Asked Questions

What is CVE-2024-34715?
CVE-2024-34715 is a security vulnerability in Ethyca fides involving Fides Webserver Logs Hosted Database Password Partial Exposure Vulnerability under CWE-116: Improper Encoding or Escaping of Output.
Which Ethyca fides versions are affected?
Affected versions include releases prior to 2.37.0 across affected packages: ethyca-fides.
What version fixes CVE-2024-34715?
Upgrading to 2.37.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ethyca-fides affected?
Yes, ethyca-fides is affected in releases prior to 2.37.0. Upgrade your dependency to 2.37.0 or later.
What is the CVSS score of CVE-2024-34715?
CVE-2024-34715 has a CVSS v3.1 base score of 2.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2024-34715?
CVE-2024-34715 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check PyPI dependencies for CVE-2024-34715?
Run the dependency tree command: 'pip show ethyca-fides'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8cm5-jfj2-26q7",
  "modified" : "2024-05-31T20:44:41Z",
  "published" : "2024-05-29T15:25:51Z",
  "aliases" : [ "CVE-2024-34715" ],
  "summary" : "Fides Webserver Logs Hosted Database Password Partial Exposure Vulnerability",
  "details" : "The Fides webserver requires a connection to a hosted PostgreSQL database for persistent storage of application data. If the password used by the webserver for this database connection includes special characters such as `@` and `$`, webserver startup fails and the part of the password following the special character is exposed in webserver error logs.\n\nThis is caused by improper escaping of the SQLAlchemy password string, see [here](https://docs.sqlalchemy.org/en/14/core/engines.html#escaping-special-characters-such-as-signs-in-passwords) and [here](https://github.com/sqlalchemy/sqlalchemy/discussions/6615) for more info.\n\n### Impact\nPartial exposure of hosted database password in webserver logs\n\n### Patches\nThe vulnerability has been patched in Fides version `2.37.0`. Users are advised to upgrade to this version or later to secure their systems against this threat.\n\n### Workarounds\nThere are no workarounds.\n\n### Proof of Concept\n1. Create a hosted PostgreSQL database for Fides with a password including `@` or `$` e.g. `p@ssword`\n2. Run Fides and observe failure, sample log attached\n\n```\nfides  | 2024-02-28 14:27:52.609 | ERROR    | fides.api.db.database:configure_db:117 - Unable to configure database: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name \"ssword@fides-db\" to address: Name or service not known\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ethyca-fides"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.37.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ethyca/fides/security/advisories/GHSA-8cm5-jfj2-26q7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34715"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ethyca/fides/commit/6ab37b1ffe2b1a3bd35b706a82f78e061086141c"
  }, {
    "type" : "WEB",
    "url" : "https://docs.sqlalchemy.org/en/14/core/engines.html#escaping-special-characters-such-as-signs-in-passwords"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ethyca/fides"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sqlalchemy/sqlalchemy/discussions/6615"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-532" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-29T15:25:51Z",
    "nvd_published_at" : "2024-05-29T17:16:20Z"
  }
}