CVE-2026-67354: Guzzle: URI fragments disclosed in redirect Referer headers

Published Jul 20, 2026
·
Updated

Impact

When the optional referer redirect setting is enabled, affected versions of RedirectMiddleware can copy the fragment from the referring request URI into a generated Referer header. A URI fragment is the part after #. It is handled locally by the client and is not part of the HTTP request target, so the server handling the original request does not receive it. A generated Referer tells the redirect destination which URI led to the request. Guzzle correctly removes user information from that value, but retains the fragment when it follows a redirect to the same scheme, such as HTTPS to HTTPS. For example, an initial URI ending in #secret is sent without the fragment, but the redirect destination can receive a Referer ending in #secret. This behavior affects both the cURL and stream handlers.

An attacker who controls the redirect destination can read the fragment from the incoming header, including through request logs or application code. If the fragment contains a one-time login secret, access token, state value, or other private client data, it is disclosed to a server that was never meant to receive it. Exploitation requires the application to enable allowredirects.referer, make a request to a URI with a sensitive fragment, and follow a same-scheme redirect to a less-trusted destination.

The referer setting is disabled by default. Applications that leave it disabled, do not put sensitive data in URI fragments, do not follow redirects, or only redirect within the same trust boundary are not affected. Guzzle already omits the generated header when the scheme changes. This issue is limited to the fragment's inclusion. Reducing the path and query on cross-origin redirects is a separate privacy policy question.

Patches

The issue is patched in 7.15.1 and later. Starting in that release, Guzzle removes both user information and the fragment before generating a redirect Referer value. Other redirect behavior does not change. Guzzle retains the referring path and query, and continues to omit the header when the scheme changes. Versions before 7.15.1 are affected when the optional referer setting is enabled.

Workarounds

If you cannot upgrade immediately, leave automatic Referer generation disabled. It is off by default. If redirect options are configured explicitly, ensure that referer is false:

php $client->request('GET', $uri, [ 'allowredirects' => ['referer' => false], ]);

Alternatively, disable automatic redirects and follow trusted destinations manually, or remove the fragment from the request URI before sending a request that may redirect. Do not rely on the fact that fragments are absent from the initial HTTP request target, because the affected middleware can reintroduce them in the generated header.

References

https://www.rfc-editor.org/rfc/rfc9110.html#section-10.1.3 https://www.rfc-editor.org/rfc/rfc3986.html#section-3.5 https://www.rfc-editor.org/rfc/rfc9700.html#section-4.2.3

Other sources

Guzzle: URI fragments disclosed in redirect Referer headers

— Packagist

guzzlehttp/guzzle versions before 7.15.1 contain an information disclosure vulnerability in RedirectMiddleware. When the optional allowredirects.referer setting is enabled, the middleware copies the URI fragment (the portion after '#') from the referring request into the generated Referer header when following a same-scheme redirect (e.g., HTTPS to HTTPS). An attacker who controls the redirect destination can read this fragment from the incoming Referer header, potentially disclosing one-time login secrets, access tokens, state values, or other sensitive client data to a server never meant to receive it. The referer setting is disabled by default. Fixed in 7.15.1, which strips the fragment before generating the Referer value.

— MITRE

Affected Software

4 affected componentsFixes available
guzzlehttp/guzzle<7.15.1
composer/guzzlehttp/guzzle<7.15.1
7.15.1
composer/guzzlehttp/guzzle<7.15.1
7.15.1
IBM API Connect V12 OnPrem<=v12.1.0.0 - v12.1.1.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 7.15.1
  2. Upgrade

    Upgrade guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 7.15.1
  3. Configuration

    Keep automatic Referer generation disabled; if redirect options are configured explicitly, set allow_redirects.referer to false.

    Guzzle RedirectMiddleware allow_redirects.referer = false

Event History

Jul 20, 2026
Advisory Published
via GitHub·11:28 PM
Data Sourced
via GitHub·11:28 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via Packagist·11:28 PM
DescriptionSeverityAffected Software
Aug 1, 2026
CVE Published
via MITRE·12:22 PM
Data Sourced
via MITRE·12:22 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:17 PM
DescriptionSeverityWeakness
Oct 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-67354?

CVE-2026-67354 has a medium severity rating of 5.9.

2

How do I fix CVE-2026-67354?

To fix CVE-2026-67354, update guzzlehttp/guzzle to version 7.15.1 or later.

3

What type of vulnerability is CVE-2026-67354?

CVE-2026-67354 is an information disclosure vulnerability.

4

Which versions of guzzlehttp/guzzle are affected by CVE-2026-67354?

Versions of guzzlehttp/guzzle before 7.15.1 are affected by CVE-2026-67354.

5

What does the URI Fragment Disclosure in CVE-2026-67354 impact?

CVE-2026-67354 impacts the Referer header by potentially exposing sensitive URI fragment information.

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