GHSA-rcvg-jj3g-rj7c

Suggest an improvement
Source
https://github.com/advisories/GHSA-rcvg-jj3g-rj7c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-rcvg-jj3g-rj7c/GHSA-rcvg-jj3g-rj7c.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rcvg-jj3g-rj7c
Aliases
  • CVE-2024-35189
Published
2024-06-02T22:28:03Z
Modified
2024-06-02T22:57:04.284798Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Sensitive Data Disclosure Vulnerability in Connection Configuration Endpoints
Details

The Fides webserver has a number of endpoints that retrieve ConnectionConfiguration records and their associated secrets which can contain sensitive data (e.g. passwords, private keys, etc.). These secrets are stored encrypted at rest (in the application database), and the associated endpoints are not meant to expose that sensitive data in plaintext to API clients, as it could be compromising.

Fides's developers have available to them a Pydantic field-attribute (sensitive) that they can annotate as True to indicate that a given secret field should not be exposed via the API. The application has an internal function that uses sensitive annotations to mask the sensitive fields with a "**********" placeholder value.

This vulnerability is due to a bug in that function, which prevented sensitive API model fields that were nested below the root-level of a secrets object from being masked appropriately. Only the BigQuery connection configuration secrets meets these criteria: the secrets schema has a nested sensitive keyfile_creds.private_key property that is exposed in plaintext via the APIs.

Connection types other than BigQuery with sensitive fields at the root-level that are not nested are properly masked with the placeholder and are not affected by this vulnerability.

Impact

The Google Cloud secrets used for a Fides BigQuery integration may be retrieved in plaintext by any authenticated Admin UI user, except those with the Approver role. Any API users authorized to access the following endpoints may also retrieve the key in plaintext.

Endpoints impacted: - GET /api/v1/connections - PATCH /api/v1/connections - GET /api/v1/connection/{connection_key} - PATCH /api/v1/system/{system_key}/connection - GET /api/v1/system/{system_key} - GET /api/v1/system/{system_key}/connection

Connection config secret schemas impacted: - BigQuerySchema

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.

Users are also advised to rotate any Google Cloud secrets used for BigQuery integrations in their Fides deployments: https://cloud.google.com/iam/docs/key-rotation

Workarounds

There are no workarounds.

Proof of concept

Multiple endpoints are impacted, but this PoC will use GET /api/v1/system/{system_key} as an example.

  1. Using the Admin UI, navigate to /add-systems. Add and save a new system bq_poc.
  2. In the integrations tab of the new system, configure and save a BigQuery integration with secrets.
  3. Log in as a different user with any role except Approver and navigate to the /systems page.
  4. Open the network section of your browser's developer tools.
  5. Click on the bq_poc system's meatball menu and then click edit.
  6. In the network section of browser dev tools you will observe a HTTP GET http://localhost:8080/api/v1/system/bq_poc/ request. In the body of the JSON response the integration secrets values entered in Step 2 are exposed in plaintext i.e.
    {
      "secrets": {
        "keyfile_creds": {
          "type": "value",
          "project_id": "value",
          "private_key_id": "value",
          "private_key": "value",
          "client_email": "value",
          "client_id": "value",
          "auth_uri": "value",
          "token_uri": "value",
          "auth_provider_x509_cert_url": "value",
          "client_x509_cert_url": "value"
        }
      }
    }
    
Database specific
{
    "nvd_published_at": "2024-05-30T20:15:09Z",
    "cwe_ids": [
        "CWE-200"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-06-02T22:28:03Z"
}
References

Affected packages

PyPI / ethyca-fides

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.37.0

Affected versions

1.*

1.9.9

2.*

2.0.0
2.1.0
2.2.0
2.2.1
2.2.2
2.3.0
2.3.1
2.4.0
2.5.0
2.5.1
2.6.0
2.6.1
2.6.2
2.6.3
2.6.4
2.6.5
2.6.6
2.7.0
2.7.1
2.8.0
2.8.1
2.8.2
2.8.3
2.9.0
2.9.1
2.9.2
2.10.0
2.10.1b2
2.10.1b3
2.11.0
2.11.1b0
2.11.1b1
2.11.1b2
2.11.1b3
2.11.1b4
2.11.1b5
2.11.1b6
2.12.0
2.12.1b0
2.12.1b1
2.12.1b2
2.12.1b3
2.12.1b4
2.12.1
2.12.2b0
2.12.2b1
2.12.2b2
2.13.0
2.13.1b0
2.13.1b1
2.13.1b2
2.14.0
2.14.1b0
2.14.1b1
2.14.1b2
2.14.1
2.14.2b0
2.14.2
2.14.3b0
2.15.0
2.15.1b0
2.15.1b1
2.15.1
2.15.2b0
2.16.0
2.16.1b0
2.16.1b1
2.17.0
2.17.1b0
2.17.1
2.18.0
2.18.1b0
2.18.1b1
2.18.1b2
2.18.1b4
2.18.1b5
2.18.1b6
2.18.1b7
2.19.0rc6
2.19.0rc7
2.19.0rc8
2.19.0rc10
2.19.0
2.19.1b0
2.19.1rc1
2.19.1rc2
2.19.1
2.19.2b0
2.19.2b1
2.19.2b2
2.20.0rc0
2.20.0rc1
2.20.0rc2
2.20.0rc3
2.20.0rc4
2.20.0rc5
2.20.0rc6
2.20.0rc7
2.20.0
2.20.1b0
2.20.1b1
2.20.1b2
2.20.1b3
2.20.1rc0
2.20.1
2.20.2b0
2.20.2rc0
2.20.2
2.20.3b0
2.20.3b1
2.20.3b2
2.21.0rc0
2.21.0rc1
2.21.0rc2
2.21.0rc3
2.21.0rc4
2.21.0rc5
2.21.0
2.21.1b0
2.21.1b2
2.21.1b3
2.22.0rc0
2.22.0rc1
2.22.0rc2
2.22.0rc3
2.22.0rc4
2.22.0rc5
2.22.0
2.22.1b0
2.22.1b1
2.22.1b2
2.22.1b3
2.22.1rc0
2.22.1rc1
2.22.1
2.22.2b0
2.22.2b1
2.22.2b2
2.22.2b3
2.23.0rc0
2.23.0rc1
2.23.0rc2
2.23.0rc3
2.23.0rc4
2.23.0rc5
2.23.0rc6
2.23.0rc7
2.23.0
2.23.1b0
2.23.1rc0
2.23.1
2.23.2b0
2.23.2
2.23.3b0
2.23.3b1
2.23.3b3
2.23.3rc0
2.23.3rc1
2.23.3rc2
2.23.3
2.24.0rc0
2.24.0rc2
2.24.0rc3
2.24.0rc4
2.24.0rc5
2.24.0rc6
2.24.0rc7
2.24.0rc8
2.24.0rc9
2.24.0
2.24.1b0
2.24.1b1
2.24.1rc0
2.24.1rc1
2.24.1
2.24.2b0
2.24.2b1
2.25.0rc0
2.25.0
2.25.1b0
2.25.1b1
2.25.1b2
2.25.1b3
2.25.1b4
2.26.0rc0
2.26.0rc1
2.26.0rc2
2.26.0rc3
2.26.0rc4
2.26.0rc5
2.26.0rc6
2.26.0rc7
2.26.0rc8
2.26.0rc9
2.26.0
2.26.1b0
2.26.1b1
2.26.3
2.27.0rc0
2.27.0rc1
2.27.0rc2
2.27.0rc3
2.27.0rc4
2.27.0rc5
2.27.0rc6
2.27.0rc7
2.27.0rc8
2.27.0rc9
2.27.0
2.27.1b0
2.27.1b1
2.28.0rc0
2.28.0rc1
2.28.0rc2
2.28.0rc3
2.28.0rc4
2.28.0rc5
2.28.0
2.28.1a5
2.28.1b0
2.28.1b1
2.29.0rc0
2.29.0rc1
2.29.0rc2
2.29.0rc3
2.29.0rc4
2.29.0
2.29.1b0
2.29.1b1
2.30.0rc0
2.30.0rc1
2.30.0rc2
2.30.0
2.30.1b0
2.30.1rc0
2.30.1
2.30.2b0
2.30.2b1
2.31.0rc0
2.31.0rc1
2.31.0rc2
2.31.0rc3
2.31.0
2.31.1b0
2.31.1b2
2.32.0rc0
2.32.0rc1
2.32.0rc2
2.32.0rc3
2.32.0
2.32.1b1
2.32.1b2
2.33.0rc0
2.33.0rc1
2.33.0rc2
2.33.0rc3
2.33.0
2.33.1b0
2.33.1rc0
2.33.1
2.33.2a0
2.33.2b0
2.34.0rc0
2.34.0rc1
2.34.0rc2
2.34.0rc3
2.34.0rc4
2.34.0rc5
2.34.0
2.34.1a0
2.34.1b0
2.34.1rc1
2.34.2b0
2.34.2b1
2.34.2b2
2.34.2b3
2.35.0rc0
2.35.0rc1
2.35.0rc2
2.35.0
2.35.1rc0
2.35.1
2.35.2b0
2.35.2b1
2.36.0rc0
2.36.0rc1
2.36.0
2.36.1a0
2.36.1b0
2.36.1rc1
2.36.1rc2
2.36.1rc3
2.36.1rc4
2.36.2b0
2.36.2b1
2.36.2b2
2.36.2b3
2.36.2b4
2.36.2b5
2.37.0rc0
2.37.0rc1
2.37.0rc2
2.37.0rc3
2.37.0rc4