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

> An attacker can execute code on a developer's machine by tricking them into entering the debugger PIN via a CSRF attack in Werkzeug's debugger.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 May 2024
- **Updated:** 21 Feb 2025
- **Also known as:** AZL-40372, AZL-40466, CLEANSTART-2026-KK09084, CLEANSTART-2026-RC09498, CLSA-2026-1772410264, CLSA-2026-1782176240, DEBIAN-CVE-2024-34069, DLA-4062-1, ECHO-dd3f-db8a-65db, GHSA-2g68-c3qc-8985, MGASA-2024-0234, MINI-25fr-hc45-mrf2, MINI-rw2g-c94j-m4hf, OESA-2025-2060, PYSEC-2026-2043, RHSA-2024:10696, RHSA-2024:6016, RHSA-2024:9975, RHSA-2024:9976, ROOT-APP-PYPI-CVE-2024-34069, SUSE-SU-2024:1572-1, SUSE-SU-2024:1591-1, SUSE-SU-2024:1591-2, SUSE-SU-2024:1608-1, SUSE-SU-2024:1624-1, SUSE-SU-2024:1624-2, UBUNTU-CVE-2024-34069, USN-6799-1

## What is CVE-2024-34069?

CVE-2024-34069 is a high-severity vulnerability in Debian Debian Linux, published on 6 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2024-34069?

3 open source packages ship an affected version, including werkzeug and Werkzeug. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `werkzeug` | PyPI | All versions | 3.0.3 |
| `werkzeug` | PyPI | All versions | 3.0.3 |
| `Werkzeug` | PyPI | All versions | 3.0.3 |
| `python-werkzeug` | Red Hat:openshift_ironic:4.15::el9 | All versions | 0:2.2.3-3.el9 |
| `python3-werkzeug` | Red Hat:openshift_ironic:4.15::el9 | All versions | 0:2.2.3-3.el9 |
| `python-werkzeug` | Red Hat:openstack:16.2::el8 | All versions | 0:0.14.1-13.el8ost |
| `python3-werkzeug` | Red Hat:openstack:16.2::el8 | All versions | 0:0.14.1-13.el8ost |
| `python-werkzeug` | Red Hat:openstack:17.1::el8 | All versions | 0:2.0.1-9.el8ost |
| `python3-werkzeug` | Red Hat:openstack:17.1::el8 | All versions | 0:2.0.1-9.el8ost |
| `python-werkzeug` | Red Hat:openstack:17.1::el9 | All versions | 0:2.0.1-7.el9ost |
| `python3-werkzeug` | Red Hat:openstack:17.1::el9 | All versions | 0:2.0.1-7.el9ost |
| `python-Werkzeug` | SUSE:Enterprise Storage 7.1 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.14.1-150100.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Package Hub 15 SP6 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 0.12.2-10.16.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Python 3 15 SP5 | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 0.14.1-150100.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 0.14.1-150100.6.9.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug` | SUSE:Manager Proxy 4.3 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | SUSE:Manager Server 4.3 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | openSUSE:Leap 15.5 | All versions | 1.0.1-150300.3.8.1 |
| `python-Werkzeug` | openSUSE:Leap 15.5 | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug-doc` | openSUSE:Leap 15.5 | All versions | 0.14.1-150100.6.9.1 |
| `python-Werkzeug` | openSUSE:Leap 15.6 | All versions | 2.3.6-150400.6.9.1 |
| `python-Werkzeug-doc` | openSUSE:Leap 15.6 | All versions | 0.14.1-150100.6.9.1 |

Products: Debian Debian Linux, Fedoraproject Fedora, Palletsprojects Werkzeug.

## How do I fix CVE-2024-34069?

Upgrade werkzeug to 3.0.3 or later.

## Is CVE-2024-34069 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34069 exists.

Public exploit code:

- Pallete Projects Werkzeug Debugger Remote Code Execution (metasploit)

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-34069 and fix it if it is affected.

What it is: CVE-2024-34069 is a high-severity vulnerability in Debian Debian Linux, published on 6 May 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-34069 exists.

Affected packages and fixed versions:
- werkzeug (PyPI): affected all versions; fixed in 3.0.3
- werkzeug (PyPI): affected all versions; fixed in 3.0.3
- Werkzeug (PyPI): affected all versions; fixed in 3.0.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-34069/ (Markdown: https://insights.sbomify.com/CVE-2024-34069/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-34069
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-34069
- OSV: https://osv.dev/vulnerability/CVE-2024-34069

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-34069/
Summaries are generated and may contain mistakes; the official description above is the record.
