CVE-2024-45793: Confidant Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-rxq8-q85f-m866
CVSS 4.8
CWE-79
Published
Advisory Summary

CVE-2024-45793 is a MODERATE (CVSS 4.8) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Confidant libraries in the PyPI ecosystem. The issue involves prevent xss from confidant api call. Remediation is available by upgrading affected packages to version 6.6.2.

CVE-2024-45793 at a Glance

CVE Identifier CVE-2024-45793
GHSA Identifier GHSA-rxq8-q85f-m866
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Confidant
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 4.8

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

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-45793

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

confidant fixed: 6.6.2
pip install confidant>=6.6.2
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 confidant

How to Check if You Are Affected

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

pip show confidant

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Confidant, 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

### Impact _What kind of vulnerability is it? Who is impacted?_ Potential XSS from API calls below: GET <app>/v1/credentials GET <app>/v1/credentials/<id> GET <app>/v1/archive/credentials/<id> GET <app>/v1/archive/credentials POST <app>/v1/credentials PUT <app>/v1/credentials/<id> PUT <app>/v1/credentials/<id>/<to_revision> GET <app>/v1/services GET <app>/v1/services/<id> GET <app>/v1/archive/services/<id> GET <app>/v1/archive/services PUT <app>/v1/services/<id> PUT <app>/v1/services/<id>/<to_revision> Stored XSS that can only be used as a stored HTML injection. The attacker needs to be authenticated and have privileges to create new credentials, but could use this to show information and run scripts to other users into the same Confidant instance. ### Patches _Has the problem been patched? What versions should users upgrade to?_ yes, version 6.6.2 ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ NO ### References _Are there any links users can visit to find out more?_ https://hackerone.com/reports/2332004 https://hackerone.com/reports/2456673 https://hackerone.com/reports/2476542 Acknowledgement: Thank you Rein Daelman ([trein](https://hackerone.com/trein)) for reporting and proposing the fix.

CVE-2024-45793 Affected Confidant Versions

1 component(s)
Fixed Versions:
6.6.2
Product / Package Ecosystem Affected Versions Fixed Version
confidant
PyPI
< 6.6.2
6.6.2

References

Frequently Asked Questions

What is CVE-2024-45793?
CVE-2024-45793 is a security vulnerability in Confidant involving Prevent XSS from Confidant API call under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Confidant versions are affected?
Affected versions include releases prior to 6.6.2 across affected packages: confidant.
What version fixes CVE-2024-45793?
Upgrading to 6.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is confidant affected?
Yes, confidant is affected in releases prior to 6.6.2. Upgrade your dependency to 6.6.2 or later.
What is the CVSS score of CVE-2024-45793?
CVE-2024-45793 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-45793?
CVE-2024-45793 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2024-45793?
Run the dependency tree command: 'pip show confidant'. 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-rxq8-q85f-m866",
  "modified" : "2024-09-20T22:07:20Z",
  "published" : "2024-09-20T15:45:23Z",
  "aliases" : [ "CVE-2024-45793" ],
  "summary" : "Prevent XSS from Confidant API call",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\nPotential XSS from API calls below:\nGET <app>/v1/credentials\nGET <app>/v1/credentials/<id>\nGET <app>/v1/archive/credentials/<id>\nGET <app>/v1/archive/credentials\nPOST <app>/v1/credentials\nPUT <app>/v1/credentials/<id>\nPUT <app>/v1/credentials/<id>/<to_revision>\n\nGET <app>/v1/services\nGET <app>/v1/services/<id>\nGET <app>/v1/archive/services/<id>\nGET <app>/v1/archive/services\nPUT <app>/v1/services/<id>\nPUT <app>/v1/services/<id>/<to_revision>\n\nStored XSS that can only be used as a stored HTML injection. The attacker needs to be authenticated and have privileges to create new credentials, but could use this to show information and run scripts to other users into the same Confidant instance.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\nyes, version 6.6.2\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\nNO\n\n### References\n_Are there any links users can visit to find out more?_\nhttps://hackerone.com/reports/2332004\nhttps://hackerone.com/reports/2456673\nhttps://hackerone.com/reports/2476542\nAcknowledgement: \nThank you Rein Daelman ([trein](https://hackerone.com/trein)) for reporting and proposing the fix.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:A/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "confidant"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lyft/confidant/security/advisories/GHSA-rxq8-q85f-m866"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45793"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lyft/confidant/commit/8876b07abde0c8d2a4974f79b60562b6d0193db9"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/2332004"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/2456673"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/2476542"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lyft/confidant"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-20T15:45:23Z",
    "nvd_published_at" : "2024-09-20T20:15:05Z"
  }
}