CVE-2024-22194: cdo-local-uuid vulnerable to insertion of artifact derived from developer's Present Working Directory into demonstration code
(updated )
What kind of vulnerability is it? Who is impacted?
An information leakage vulnerability is present in cdo-local-uuid
at version 0.4.0
, and in case-utils
in unpatched versions (matching the pattern 0.x.0
) at and since 0.5.0
, before 0.15.0
.
The vulnerability stems from a Python function, cdo_local_uuid.local_uuid()
, and its original implementation case_utils.local_uuid()
. Henceforth, both will be called local_uuid()
.
local_uuid()
generates UUIDv5s using a deterministic pseudorandom number stream. This was written to make graph application demonstrations generate consistent, version-controllable output with minimal noise caused by demonstration re-runs. Part of the information used to keep individual examples’ generated output distinct from one another is seed information from the caller’s environment, particularly the program’s argument vector. The present working directory is also included as part of the seed information, but for reasons including maintaining user environment privacy, as well as keeping generated identifiers consistent regardless of where a source tree is housed on a user’s file system, the present working directory is trimmed from the left to exclude path information outside of a supplied “Top” source directory. (In context of the Make scripting language, this “top” directory is typically in a variable called top_srcdir
. In context of Git-based project management, this directory is expected to be the root directory of a freshly “Cloned” project, e.g., where .git
is stored.)
Under certain conditions, a user’s present working directory, as an absolute path, was incorporated into seed data for the local_uuid()
deterministic pseudorandom number stream. This violates an expectation made in the documented purpose of the local_uuid()
function, and leaks information about a calling user’s environment.
The conditions are:
- Given a project with top source directory
top_srcdir
, for instance/home/user1/Documents/Project1
; - Given a Python script housed directly in
top_srcdir
, for instance at${top_srcdir}/example.py
, written to support the deterministic mode oflocal_uuid()
; - Given a call to that Python script that follows the documentation for
local_uuid()
;
The absolute path for top_srcdir
was then included in the seed information for the UUIDv5 stream, when what was intended was a relative path spelling. That is, instead of ./example.py
being in the seed data, /home/user1/Documents/Project1/example.py
was in the seed data.
This does not leak the present working directory directly. But, given other knowledge of how a program had been called to generate data using local_uuid()
under these conditions, it becomes possible to determine that a chosen path can lead to a known UUIDv5 value. Note that it is not necessarily knowable that the chosen path is the only solution to a sequence reconstruction; but, the path can be confirmed to be a solution.
References
- github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID
- github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/commit/9e78f7cb1075728d0aafc918514f32a1392cd235
- github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/3
- github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/pull/4
- github.com/Cyber-Domain-Ontology/CDO-Utility-Local-UUID/security/advisories/GHSA-rgrf-6mf5-m882
- github.com/advisories/GHSA-rgrf-6mf5-m882
- github.com/casework/CASE-Utilities-Python/commit/00864cd12de7c50d882dd1a74915d32e939c25f9
- github.com/casework/CASE-Utilities-Python/commit/1cccae8eb3cf94b3a28f6490efa0fbf5c82ebd6b
- github.com/casework/CASE-Utilities-Python/commit/5acb929dfb599709d1c8c90d1824dd79e0fd9e10
- github.com/casework/CASE-Utilities-Python/commit/7e02d18383eabbeb9fb4ec97d81438c9980a4790
- github.com/casework/CASE-Utilities-Python/commit/80551f49241c874c7c50e14abe05c5017630dad2
- github.com/casework/CASE-Utilities-Python/commit/939775f956796d0432ecabbf62782ed7ad1007b5
- github.com/casework/CASE-Utilities-Python/commit/db428a0745dac4fdd888ced9c52f617695519f9d
- github.com/casework/CASE-Utilities-Python/commit/e4ffadc3d56fd303b8f465d727c4a58213d311a1
- github.com/casework/CASE-Utilities-Python/commit/fca7388f09feccd3b9ea88e6df9c7a43a5349452
- github.com/casework/CASE-Utilities-Python/commit/fdc32414eccfcbde6be0fd91b7f491cc0779b02d
- github.com/pypa/advisory-database/tree/main/vulns/case-utils/PYSEC-2024-5.yaml
- github.com/pypa/advisory-database/tree/main/vulns/cdo-local-uuid/PYSEC-2024-6.yaml
- nvd.nist.gov/vuln/detail/CVE-2024-22194
Detect and mitigate CVE-2024-22194 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →