Ethical Hacking Automation

Automate Recon and scanning process with Vidoc. All security teams in one place

Flask Werkzeug Debugger Exposure

By kannthu

Low
Vidoc logoVidoc Module
#werkzeug#exposure#debug
Description

What is the "Flask Werkzeug Debugger Exposure?"

The "Flask Werkzeug Debugger Exposure" module is designed to detect a misconfiguration in Flask applications that exposes the Werkzeug debugger. Werkzeug is a powerful Python utility library used for web development, and the debugger is a feature that allows developers to inspect and debug their applications during development. However, exposing the debugger in a production environment can pose a security risk.

This module focuses on identifying instances where the Werkzeug-powered traceback interpreter is present in the HTML response body. It also checks for a response status code of 500, indicating a server error. The severity of this misconfiguration is classified as low.

This module was authored by DhiyaneshDk.

Impact

If the Flask Werkzeug debugger is exposed in a production environment, it can potentially leak sensitive information about the application, including source code, stack traces, and variable values. This information can be exploited by attackers to gain unauthorized access or launch further attacks on the system.

How the module works?

The module works by sending HTTP requests to the target Flask application and analyzing the responses. It checks for the presence of the "Werkzeug powered traceback interpreter" string in the HTML response body, indicating that the debugger is enabled. Additionally, it verifies that the response status code is 500, confirming the presence of a server error.

Here is an example of an HTTP request that the module might send:

GET / HTTP/1.1
Host: example.com
User-Agent: Vidoc-Scanner
Accept: */*

The module uses matching conditions to determine if the misconfiguration is present. It checks both the response body and the status code to ensure accurate detection. If the conditions are met, the module will report the vulnerability.

Module preview

Concurrent Requests (0)
Passive global matcher
word: Werkzeug powered traceback interpreterand
status: 500
On match action
Report vulnerability