CVE-2026-141535: Addressable URI#hostname strips brackets from hosts that aren't IP literals
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.10.0
Event History
Frequently Asked Questions
What application pattern is exposed to this issue?
Applications are exposed when they validate Addressable::URI#host but make connections using Addressable::URI#hostname, either directly or through Net::HTTP. In that pattern, a bracketed non-IP hostname can pass validation as an unresolved value and then be used as the corresponding hostname for a loopback or internal connection.
Does exploitation require authentication or user interaction?
No. The supplied vector indicates network reachability, no privileges, and no user interaction, although exploitation has high attack complexity.
Which Addressable versions should be remediated?
Addressable versions from 2.3.5 until 2.10.0 are affected. Upgrade to version 2.10.0, which fixes the issue.
What is the impact if exploitation succeeds?
The issue can enable server-side request forgery to a loopback or internal hostname. The provided severity vector indicates low confidentiality impact and no integrity or availability impact.