Skip to content

ConsoleMe has an Arbitrary File Read Vulnerability via Limited Git command

Critical severity GitHub Reviewed Published May 16, 2024 in Netflix/consoleme • Updated May 16, 2024

Package

pip consoleme (pip)

Affected versions

< 1.4.0

Patched versions

1.4.0

Description

ID: NFLX-2024-002

Impact

Authenticated 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.
However, 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.

Deployments of ConsoleMe that allow templated resources are impacted and urged to patch immediately. Deployments that do not permit templated resources are not affected.

To 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.

Description

The 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.

Patches

This issue has been patched in version v1.4.0 via Netflix/consoleme#9380.
If 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).

Credit

Jay Dhulia

References

@jaydhulia jaydhulia published to Netflix/consoleme May 16, 2024
Published by the National Vulnerability Database May 16, 2024
Published to the GitHub Advisory Database May 16, 2024
Reviewed May 16, 2024
Last updated May 16, 2024

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

EPSS score

0.043%
(10th percentile)

Weaknesses

CVE ID

CVE-2024-5023

GHSA ID

GHSA-3783-62vc-jr7x

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.