CVE-2026-145047: Guzzle before 7.16.3 Host Check Bypass via Malformed Bracketed URI Host

Published Dec 4, 2026
·
Updated

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

1 affected component
composer/guzzlehttp/guzzle<7.16.3

Event History

Dec 4, 2026
CVE Published
via MITRE·04:10 PM
Data Sourced
via MITRE·04:10 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:19 PM
DescriptionSeverityWeakness
Event
via NVD·05:19 PM

Frequently Asked Questions

1

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.

2

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.

3

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().

4

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203