RCE on - https://dps.midi.data.mozilla.org/ through exposed debugging console
An exposed Werkzeug debugger console was accessible on a production web service. If the PIN could be guessed or obtained, an attacker could execute arbitrary code on the server.
Originally disclosed on Mozilla
- Fixed in 4 days
- Paid in 4 days
- Disclosed after 4 days
Hi All.
I have managed to find an exposed Werkzeug Debugger situated here - https://dps.midi.data.mozilla.org/console should the pin be guessed it will enable me to be able to obtain remote code execution on the webservice. I have attempted to run a low bruteforce of this pin through Burpsuite, however I have locked the console (sorry! Was trying to demonstrate rce).
As mentioned here - https://werkzeug.palletsprojects.com/en/1.0.x/debug/
Danger
The debugger allows the execution of arbitrary code which makes it a major security risk. The debugger must never be used on production machines. We cannot stress this enough. Do not enable the debugger in production.
There is also this exploit to obtain the pin - https://www.daehee.com/posts/werkzeug-console-pin-exploit/ (Which I haven't run yet)
Please let me know if there are any issues.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the Werkzeug debugger was left enabled in a production deployment.
What the attacker needed
Access to the exposed console URL; guess or obtain the debugger PIN
The fix
The debugger should never be enabled on production machines.
How it was found
- Find the exposed debugger console at the given URL.
- Attempt to brute-force the PIN using a tool.
- The console becomes locked after too many attempts.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A debugging tool meant for developers was left switched on in a live website. This tool lets anyone who can guess a secret PIN run commands on the server, which is very dangerous. The reporter found it but did not actually break in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.