CVE Catalog

CVE-2023-41105

HighCVSS 7.5
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

High risk
2.19%

80th percentile - higher than 80% of all known CVEs

Summary

In Python 3.11 through 3.11.4, a vulnerability was discovered where paths containing null bytes ('\0') are unexpectedly truncated by the os.path.normpath() function. This can lead to situations where an application would have rejected a file for security reasons in Python 3.10.x or earlier, but in Python 3.11.x the file is no longer rejected.

Risk Assessment

The risk involves potential bypass of security mechanisms that rely on checking file paths. An attacker can provide a path with a null byte that, after truncation, bypasses validation, leading to unauthorized access to files or other resources.

Recommendation

It is recommended to upgrade Python to version 3.11.5 or later, which includes a fix for this vulnerability. Also review application code for use of os.path.normpath() and consider adding custom path validation before processing.

Related vulnerabilities

Original NVD description (English source)

An issue was discovered in Python 3.11 through 3.11.4. If a path containing '\0' bytes is passed to os.path.normpath(), the path will be truncated unexpectedly at the first '\0' byte. There are plausible cases in which an application would have rejected a filename for security reasons in Python 3.10.x or earlier, but that filename is no longer rejected in Python 3.11.x.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS