This module will exploit the Werkzeug debug console to put down a Python shell. Werkzeug is included with Flask, but not enabled by default. It is also included in other projects, for example the RunServerPlus extension for Django. It may also be used alone. The documentation states the following: "The debugger must never be used on production machines. We cannot stress this enough. Do not enable the debugger in production." Of course this doesn't prevent developers from mistakenly enabling it in production! Tested against the following Werkzeug versions: - 3.0.3 on Debian 12, Windows 11 and macOS 14.6 - 1.1.4 on Debian 12 - 1.0.1 on Debian 12 - 0.11.5 on Debian 12 - 0.10 on Debian 12
Exploit database
Vulnerability
CVE-2024-34069
Werkzeug's improper usage of a pathname and improper CSRF protection results in the remote command execution
Vulnerability details
- Score
- 7.5
- Severity
- high
CVSS 3.1 · GitHub_M
Vector string
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HDescription
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.
CVE ProgramExploit source choices
2 sourcesPallete Projects Werkzeug Debugger Remote Code Execution
2015-06-28werkzeug_debug_rce.rb
aywengo/httpbin-k8s-deployment
Test assestment
2025-09-2914 files · 0 stars