The vulnerability lies in the isProxyable function within lib/controllers/proxy.js. The function was intended to check if a requested hostname is present in the proxyableDomains list. However, the implementation was flawed. It only checked if the hostname ended with an allowed domain string, rather than checking for an exact match or a subdomain match. This flaw is evident in the patch, which replaces the incorrect check (host.indexOf(proxyDomains[i], host.length - proxyDomains[i].length) !== -1) with a much stricter check (host === domainLower || host.endsWith("." + domainLower)). An attacker could exploit this by registering a domain that ends with an allowed domain name (e.g., maliciousexample.com when example.com is allowed), thus bypassing the proxy's security controls and potentially leading to Server-Side Request Forgery (SSRF). The vulnerable function isProxyable is the central point of this vulnerability, as it is responsible for making the faulty security decision.