← back
CVE-2024-34069

Werkzeug's improper usage of a pathname and improper CSRF protection results in the remote command execution

CVSS 7.5 HIGHEPSS 3.4%CWE-352
In short

Werkzeug's debugger can be exploited by attackers to run malicious code on a developer's computer if the developer visits an attacker-controlled website and enters the debugger PIN. This is dangerous because it gives attackers direct access to run commands on the developer's machine.

Technical detail

A CSRF protection bypass (CWE-352) combined with improper pathname handling in Werkzeug's debugger allows remote code execution. The attack requires social engineering to trick a developer into visiting an attacker-controlled domain, entering the debugger PIN, and guessing a URL that triggers the debugger; successful exploitation grants arbitrary code execution even when the debugger is bound to localhost.

Summary generated and translated by AI from the 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.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Affected products
pallets · werkzeug

Want to know if your infrastructure is exposed to this?

Talk to TrueHacking →