Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.3.5 until 2.10.0, Addressable accepts bracketed non-IP hosts that are not IPv6 or IPvFuture literals, while Addressable::URI#hostname removes those brackets. Code that checks Addressable::URI#host but connects with Addressable::URI#hostname, including through Net::HTTP, can permit an unresolved bracketed value and then connect to the corresponding loopback or internal hostname. This issue is fixed in version 2.10.0.
https://github.com/sporkmonger/addressable/security/advisories/GHSA-c7j3-jq7p-v3pr
https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0
https://github.com/sporkmonger/addressable/commit/b56b49d54f87887fa8f0e42216618eaa9af273de