CVE-2023-46136: High-Severity DoS Vulnerability in Werkzeug Multipart Parser Threatens Servers
A high-severity denial-of-service (DoS) vulnerability has been disclosed in the widely used Python web framework library, Werkzeug. Tracked as CVE-2023-46136 (GHSA-2g68-c3qc-8985), the flaw resides in the library's `multipart/form-data` parser. An attacker can exploit this by crafting a malicious upload containing a large part that begins with a CR/LF (carriage return/line feed) character. This triggers abnormally high resource consumption, allowing an attacker to exhaust server CPU and memory, potentially crippling affected web applications.
The vulnerability affects all versions of Werkzeug from 0.9.0 up to, but not including, 3.0.1. The flaw is patched in version 3.0.1. However, this fix introduces a significant complication for developers: upgrading to the secure version requires a major version bump from the 2.x series to 3.x, which comes with breaking API changes. Automated tools like Dependabot can initiate the update, but they cannot resolve the resulting code incompatibilities. Tests will fail without manual intervention to update the broken call sites identified in the changelog.
This situation creates a critical pressure point for development and security teams. The need to patch a high-severity vulnerability is urgent, but it is entangled with a complex, non-automatable migration. Organizations relying on Werkzeug must now weigh the immediate security risk against the engineering effort required for a major version upgrade, a process that demands careful code review and modification beyond simple dependency management.