Vulnerability · Published Oct 25, 2024 · Assigned by GitHub_M
CVE-2024-49766Werkzeug safe_join not safe on Windows
Medium 6.3
In plain English
A medium-severity path traversal in werkzeug from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 56% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Werkzeug is a Web Server Gateway Interface web application library. 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. Werkzeug version 3.0.6 contains a patch.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | werkzeug | 3.0.6 | GHSA-f9vj-2wh5-fj8j |
| PyPI | werkzeug | 3.0.6 | PYSEC-2026-2045 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/pallets/werkzeug/security/advisories/GHSA-f9vj-2wh5-fj8j x_refsource_CONFIRM
- https://github.com/pallets/werkzeug/commit/2767bcb10a7dd1c297d812cc5e6d11a474c1f092 x_refsource_MISC
- https://github.com/pallets/werkzeug/releases/tag/3.0.6 x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20250131-0005/