The root cause of the vulnerability was an improper trust in the network location of incoming requests. The application used two functions, isLocalRequest and isLoopbackRequest, to determine if a request originated from the local machine, granting it special privileges, such as bypassing authentication for the Inspector API. The flaw in these functions was that they only checked the immediate source IP of the request. In a common production setup where the application runs behind a reverse proxy on the same server, all public traffic is forwarded to the application via a loopback connection (e.g., from 127.0.0.1). The vulnerable functions saw the request coming from the loopback address and incorrectly classified it as a trusted, local request. This allowed any remote attacker to send a request to the reverse proxy and gain the same level of access as a local user, leading to an authentication bypass. The patch fixes this by inspecting the X-Forwarded-For header to identify the true originating IP address and now requires all addresses in the proxy chain to be loopback addresses for the request to be considered local in a production environment.