Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. guzzlehttp/guzzle
  4. ›
  5. GHSA-h95v-h523-3mw8

GHSA-h95v-h523-3mw8: Guzzle: URI fragments disclosed in redirect Referer headers

July 20, 2026 (updated August 4, 2026)

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 allow_redirects.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.

References

  • github.com/advisories/GHSA-h95v-h523-3mw8
  • github.com/guzzle/guzzle/commit/7b68220d6543f6f80fe62e633361fc9d4ead14d4
  • github.com/guzzle/guzzle/pull/3901
  • github.com/guzzle/guzzle/releases/tag/7.15.1
  • github.com/guzzle/guzzle/security/advisories/GHSA-h95v-h523-3mw8
  • nvd.nist.gov/vuln/detail/CVE-2026-67354
  • www.vulncheck.com/advisories/guzzlehttp-guzzle-before-uri-fragment-disclosure-via-referer

Code Behaviors & Features

Detect and mitigate GHSA-h95v-h523-3mw8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 7.15.1

Fixed versions

  • 7.15.1

Solution

Upgrade to version 7.15.1 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-201: Insertion of Sensitive Information Into Sent Data
  • CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer

Source file

packagist/guzzlehttp/guzzle/GHSA-h95v-h523-3mw8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:55 +0000.