Python
cpe:2.3:a:python:python:*:*:*:*:*:*:*
A denial-of-service vulnerability has been identified in the Python CPython standard library, specifically within the 'path' modules. The issue arises in the 'os.path.expandvars()' function, which is used to expand shell variables in strings. When the input to this function is controlled by the user, it can lead to a performance degradation due to quadratic complexity in the variable expansion process. This vulnerability has been acknowledged and fixed in versions 3.9, 3.10, 3.11, 3.12, 3.13, and 3.14.
Exploitation of this vulnerability causes a significant performance hit, as the 'os.path.expandvars()' function can become inefficient with certain inputs, leading to slower execution times and increased resource consumption.
The vulnerability can be reproduced by calling the 'os.path.expandvars()' function with a string that includes a large number of environment variable references. This can be done by creating a string that, for example, repeats variable references many times, such as 10,000 instances of a variable reference. The 'ntpath' module can be used for this, especially on Windows systems, where the vulnerability is more pronounced.
Users can upgrade to Python versions 3.9, 3.10, 3.11, 3.12, 3.13, or 3.14 to address this vulnerability.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.