GHSA-hq7v-mx3g-29hw

Suggest an improvement
Source
https://github.com/advisories/GHSA-hq7v-mx3g-29hw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-hq7v-mx3g-29hw/GHSA-hq7v-mx3g-29hw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hq7v-mx3g-29hw
Aliases
  • CVE-2026-49214
Downstream
Related
Published
2026-06-11T13:04:47Z
Modified
2026-06-19T18:29:27.412514871Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
guzzlehttp/psr7 has CRLF Injection via URI Host Component
Details

Impact

guzzlehttp/psr7 did not reject ASCII control characters, whitespace, or DEL in first-party URI host components. The issue requires a PSR-7 request to be serialized into a raw HTTP/1.x message, for example with GuzzleHttp\Psr7\Message::toString() or an equivalent custom serializer. Creating a Uri, Request, or other PSR-7 object alone is not sufficient. The malformed host must be copied into the serialized Host header without further validation.

A vulnerable flow is:

  1. An application accepts a user-controlled URL.
  2. The URL is used to construct a PSR-7 Uri or Request.
  3. The host component contains CRLF or another header-unsafe character.
  4. The request is serialized into a raw HTTP/1.x message without an explicit Host header.
  5. The host is copied into the serialized Host header.
  6. The serialized request is written to the network or otherwise processed by software that does not independently reject the malformed host.

In that flow, an attacker can cause the serialized request to contain additional attacker-controlled header lines. For example, a host containing "\r\nX-Injected: yes" can cause the generated Host header to span multiple HTTP header lines.

This is not the normal request-sending path used by guzzlehttp/guzzle. Applications using guzzlehttp/psr7 only through Guzzle's standard HTTP client APIs are not expected to be affected. Applications are most likely to be affected when they manually serialize PSR-7 requests, forward raw HTTP messages, or use custom transports, proxying, crawling, webhook delivery, or similar request-dispatch code that serializes requests without independently validating URI hosts and header data. In deployments involving HTTP/1.1 connection reuse, proxies, gateways, or load balancers, this malformed serialized request may also contribute to request smuggling or cache poisoning, depending on how downstream components parse the request.

Patches

The issue is patched in 2.10.2 and later. 1.x is end-of-life and will not receive a patch.

Workarounds

If you cannot upgrade immediately, validate and reject all untrusted URI strings before constructing PSR-7 Uri or Request instances. Reject input containing ASCII control characters, whitespace, or DEL, including CRLF, tab, space, NUL, or DEL characters:

if (preg_match('/[\x00-\x20\x7F]/', $untrustedUrl)) {
    throw new \InvalidArgumentException('Insecure URL detected');
}

Applications that manually serialize or forward requests should also ensure the final HTTP client, transport, or serializer rejects invalid URI and header data before writing requests to the network.

References

  • https://www.rfc-editor.org/rfc/rfc9112.html#section-3.2
  • https://www.rfc-editor.org/rfc/rfc9112.html#section-5
  • https://www.rfc-editor.org/rfc/rfc9112.html#section-11.2
  • https://www.rfc-editor.org/rfc/rfc9110.html#section-7.2
Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-11T13:04:47Z",
    "nvd_published_at": "2026-06-11T13:16:33Z",
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-113",
        "CWE-20",
        "CWE-93"
    ]
}
References

Affected packages

Packagist / guzzlehttp/psr7

Package

Name
guzzlehttp/psr7
Purl
pkg:composer/guzzlehttp%2Fpsr7

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.10.2

Affected versions

1.*
1.0.0
1.1.0
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0
1.3.1
1.4.0
1.4.1
1.4.2
1.5.0
1.5.1
1.5.2
1.6.0
1.6.1
1.7.0
1.8.0
1.8.1
1.8.2
1.8.3
1.8.4
1.8.5
1.9.0
1.9.1
2.*
2.0.0-beta1
2.0.0-rc1
2.0.0
2.1.0
2.1.1
2.1.2
2.2.0
2.2.1
2.2.2
2.3.0
2.4.0
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.5.0
2.5.1
2.6.0
2.6.1
2.6.2
2.6.3
2.7.0
2.7.1
2.8.0
2.8.1
2.9.0
2.9.1
2.10.0
2.10.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-hq7v-mx3g-29hw/GHSA-hq7v-mx3g-29hw.json"