The vulnerability lies in the assertSecureUrl function within core/src/shared/secure-fetch.ts. This function is responsible for ensuring that URLs passed to the secureFetch function are secure (i.e., use HTTPS). For development purposes, it includes an exception for localhost connections. However, the original implementation of this exception was incomplete. It only checked for the hostnames 'localhost' and '127.0.0.1'.
The patch, found in commit 25d1fb491d99479efdf501f5f75e0bb80c908f0a, rectifies this by expanding the check to include other common representations of the loopback address, such as '[::1]' (the standard IPv6 loopback address), '0.0.0.0' (which can resolve to localhost in some contexts), and any address starting with '127.', which covers the entire 127.0.0.0/8 IPv4 loopback range.
An attacker could have exploited this vulnerability by crafting a URL with a loopback address like http://[::1] or http://127.0.0.2. The vulnerable version of assertSecureUrl would not recognize this as a localhost address and, depending on the context where secureFetch is used (especially on a server), this could lead to a Server-Side Request Forgery (SSRF) attack, where the server is tricked into making a request to an internal service.