CVE-2024-5023: Consoleme ConsoleMe Has An Arbitrary File Vulnerability
CRITICALCVE-2024-5023 is a CRITICAL (CVSS 9.6) consoleme has an arbitrary file vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Consoleme libraries in the PyPI ecosystem. The issue involves consoleme has an arbitrary file read vulnerability via limited git command. Remediation is available by upgrading affected packages to version 1.4.0.
CVE-2024-5023 at a Glance
Security Impact
CVSS: 9.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2024-5023
To remediate this vulnerability, upgrade all affected Consoleme dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install consoleme>=1.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show consoleme
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-5023, inspect your installed packages using pip:
pip show consoleme
Analyze the terminal output to locate any version of Consoleme in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.0), your application is affected.
Note: The pip show consoleme command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Consoleme, 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
CVE-2024-5023 Affected Consoleme Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
consoleme
|
PyPI |
< 1.4.0
|
1.4.0
|
References
Frequently Asked Questions
What is CVE-2024-5023?
Which Consoleme versions are affected?
What version fixes CVE-2024-5023?
Is consoleme affected?
What is the CVSS score of CVE-2024-5023?
What CWE is associated with CVE-2024-5023?
How can I check PyPI dependencies for CVE-2024-5023?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3783-62vc-jr7x",
"modified" : "2024-05-16T21:02:36Z",
"published" : "2024-05-16T21:02:36Z",
"aliases" : [ "CVE-2024-5023" ],
"summary" : "ConsoleMe has an Arbitrary File Read Vulnerability via Limited Git command",
"details" : "## ID: NFLX-2024-002\n\n### Impact\nAuthenticated users can achieve limited RCE in ConsoleMe, restricted to flag inputs on a single CLI command. Due to this constraint, it is not currently known whether full RCE is possible but it is unlikely. \nHowever, a specific flag allows authenticated users to read any server files accessible by the ConsoleMe process. Given ConsoleMe's role as an AWS identity broker, accessing files containing secrets on the server could potentially be exploited for privilege escalation.\n\nDeployments of ConsoleMe that allow templated resources are impacted and urged to patch immediately. Deployments that do not permit templated resources are not affected.\n\nTo determine if your ConsoleMe deployment uses templated resources, check the configuration value for `cache_resource_templates.repositories`. If this value does not exist or is an empty array, your deployment is not impacted.\n### Description\nThe self-service flow for templated resources in ConsoleMe accepts a user-supplied JSON post body, which includes the filename for the templated resource. However, this user-supplied filename is not properly sanitized and is passed directly as a string to a CLI command. This allows users to input flags instead of filenames. By passing a specific flag with a filename value, users can induce an error that reveals the contents of the specified file, allowing them to read any files readable by the system user executing the ConsoleMe server process.\n\n### Patches\nThis issue has been patched in version [v1.4.0](https://pypi.org/project/consoleme/1.4.0/) via https://github.com/Netflix/consoleme/pull/9380. \nIf you are unable to upgrade to the latest version, users can selectively apply the code changes in the above PR. Alternatively, removing the configuration item `cache_resource_templates.repositories` or adding it as an empty array should mitigate the issue, but will result in broken functionality (templated resources will no longer be supported for self-service).\n\n### Credit\n[Jay Dhulia](https://github.com/jaydhulia)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "consoleme"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Netflix/consoleme/security/advisories/GHSA-3783-62vc-jr7x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-5023"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/consoleme/pull/9380"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/consoleme/commit/2795a2bd553938a21c0643b37452971625ce67f5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Netflix/consoleme"
}, {
"type" : "WEB",
"url" : "https://github.com/Netflix/security-bulletins/blob/master/advisories/nflx-2024-002.md"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-16T21:02:36Z",
"nvd_published_at" : "2024-05-16T18:15:10Z"
}
}