CVE-2024-49766: Werkzeug safe_join not safe on Windows
On Python < 3.11 on Windows, `os.path.isabs()` does not catch UNC paths like `//server/share`. Werkzeug's `safe_join()` relies on this check, and so can produce a path that is not safe, potentially allowing unintended access to data. Applications using Python >= 3.11, or not using Windows, are not vulnerable.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-49766?
CVE-2024-49766 has a moderate severity due to potential data access issues caused by unsafe path handling.
How do I fix CVE-2024-49766?
To fix CVE-2024-49766, update Werkzeug to version 3.0.6 or higher.
Who is affected by CVE-2024-49766?
CVE-2024-49766 affects applications using Werkzeug versions up to 3.0.5 and Python versions prior to 3.11 on Windows.
What does CVE-2024-49766 exploit?
CVE-2024-49766 exploits a vulnerability in the `os.path.isabs()` function failing to catch UNC paths.
Is there a workaround for CVE-2024-49766?
A workaround for CVE-2024-49766 is to avoid using Werkzeug's `safe_join()` with UNC paths until a proper patch is applied.