The vulnerability lies in Starlette's handling of application/x-www-form-urlencoded form data. The request.form() method, a common entry point for handling form submissions, did not enforce configured limits (max_fields and max_part_size) for this specific content type. This was because the underlying FormParser was not initialized with these limits, and its parse method lacked the necessary checks.
An unauthenticated attacker could send a POST request with a massive number of fields or an extremely large field value. This would cause the FormParser.parse function to either enter a long loop, consuming CPU and blocking the server's event loop, or allocate a large amount of memory, leading to a denial-of-service (DoS) condition.
The patch rectifies this by updating the Request._get_form method to pass the limits to the FormParser constructor. The FormParser itself was modified to accept these limits and enforce them during the parsing process, throwing an exception if the limits are exceeded. The primary vulnerable functions are Request.form (the public API) and FormParser.parse (where the resource exhaustion occurs).