This vulnerability occurs when a system incorrectly assigns or routes an object to the wrong processing component.
Deploying the wrong handler is a misconfiguration or logic flaw where an application sends data or a request to an unintended processing module. For instance, this could involve mistakenly routing a request for a JSP file's source code to a servlet designed to display it, rather than to the component that executes it. Such incorrect routing often bypasses the intended security controls and business logic, exposing the underlying system to unintended behavior. This issue frequently stems from flawed type-determination logic, where the system automatically infers how to handle an object, overriding an explicitly declared type. Developers encounter this when trust is placed in dynamic dispatch mechanisms, file upload handlers, or content-type resolvers that make incorrect assumptions. The core risk is that the wrong handler processes sensitive data or commands, potentially leading to information disclosure, code execution, or system manipulation.
Impact: Varies by ContextUnexpected State