CVE-2026-145047: Guzzle before 7.16.3 Host Check Bypass via Malformed Bracketed URI Host
Guzzle (guzzlehttp/guzzle) before 7.16.3 accepts bracketed request URI hosts that are not IP literals, such as [127.0.0.1]:6379], while PHP's stream transport connects to the host and port inside and after the brackets, regardless of what Uri::getHost() and Uri::getPort() report. Attackers who influence a fetched URI or redirect target can bypass application host and port checks, causing StreamHandler to reach excluded loopback hosts or ports for server-side request forgery.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using guzzlehttp/guzzle before 7.16.3 are exposed when they use Guzzle's StreamHandler and allow an attacker to influence a fetched URI or a redirect target. The practical risk is highest where the application relies on Uri::getHost() or Uri::getPort() to block loopback destinations or restricted ports.
What does an attacker need to exploit it?
The attacker needs control over a request URL or redirect target that the application fetches. They can use a malformed bracketed host such as [127.0.0.1]:6379] so application validation sees different host or port values than PHP's stream transport uses for the connection.
Are default host and port restrictions sufficient?
No, if the restriction is implemented using Guzzle URI host or port values before the StreamHandler fetch occurs. PHP's stream transport may connect to the host and port inside and after the malformed brackets rather than the values reported by Uri::getHost() and Uri::getPort().
How can I tell whether my application is affected?
Check whether it uses guzzlehttp/guzzle before 7.16.3, uses StreamHandler, and fetches URLs or follows redirects influenced by untrusted input. Review any SSRF protections that permit or deny destinations based on Uri::getHost() or Uri::getPort(), especially protections intended to exclude loopback hosts or ports.