CVE-2024-49766: Werkzeug safe_join not safe on Windows
On Python = 3.11, or not using Windows, are not vulnerable.
Published Oct 25, 2024 · Updated Jan 31, 2025
Affected packages
Werkzeug
- Ecosystem
- PyPI
- Affected
- <= 3.0.5
- Fixed in
- 3.0.6
- Check
pip show Werkzeug
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to nvn1729.
References
- https://github.com/pallets/werkzeug/security/advisories/GHSA-f9vj-2wh5-fj8j
- https://github.com/pallets/werkzeug/commit/2767bcb10a7dd1c297d812cc5e6d11a474c1f092
- https://nvd.nist.gov/vuln/detail/CVE-2024-49766
- https://github.com/pallets/werkzeug/releases/tag/3.0.6
- https://security.netapp.com/advisory/ntap-20250131-0005
- https://github.com/advisories/GHSA-f9vj-2wh5-fj8j
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-102598
Werkzeug safe_join() allows Windows special device names
medium6.3Oct 5, 2026CVE-2026-21860
Werkzeug safe_join() allows Windows special device names with compound extensions
medium5.3Jan 8, 2026CVE-2024-49767
Werkzeug possible resource exhaustion when parsing file data in forms
medium7.5Oct 25, 2024CVE-2024-34069
Werkzeug debugger vulnerable to remote execution when interacting with attacker controlled domain
high7.5May 6, 2024
