Update dependency guzzlehttp/psr7 to v2.12.3 [SECURITY]#52
Open
renovate[bot] wants to merge 1 commit into
Open
Update dependency guzzlehttp/psr7 to v2.12.3 [SECURITY]#52renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/packagist-guzzlehttp-psr7-vulnerability
branch
from
June 23, 2026 13:37
0880da4 to
ba78d99
Compare
renovate
Bot
force-pushed
the
renovate/packagist-guzzlehttp-psr7-vulnerability
branch
from
July 12, 2026 13:28
ba78d99 to
9fe6c6b
Compare
renovate
Bot
force-pushed
the
renovate/packagist-guzzlehttp-psr7-vulnerability
branch
from
July 25, 2026 00:04
9fe6c6b to
41b709d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.8.0→2.12.3guzzlehttp/psr7 has Host Confusion via Authority Reinterpretation
CVE-2026-48998 / GHSA-34xg-wgjx-8xph
More information
Details
Impact
guzzlehttp/psr7improperly interpreted malformedHostheader values when constructing request URIs from inbound request data. This issue concerns inbound request parsing and server request construction. It does not require serializing a PSR-7 request, and it is not part of the normal outbound request-sending path used byguzzlehttp/guzzle.A vulnerable flow is:
Hostvalue.Hostvalue contains URI authority delimiters, such astrusted.example@evil.example.guzzlehttp/psr7uses that value to construct a URI.@as userinfo and the portion after@as the URI host.Hostheader value.For example,
Host: trusted.example@evil.examplecan result in a PSR-7 URI whose host isevil.example, while the original Host header value remainstrusted.example@evil.example.Applications are affected if they parse attacker-controlled raw HTTP requests with
GuzzleHttp\Psr7\Message::parseRequest()or the legacy 1.xGuzzleHttp\Psr7\parse_request()function, or if they build server requests from attacker-controlled server variables withGuzzleHttp\Psr7\ServerRequest::fromGlobals()orGuzzleHttp\Psr7\ServerRequest::getUriFromGlobals(), and then rely on the resulting URI host for routing, allow-list checks, credential selection, or forwarding decisions. Applications usingguzzlehttp/psr7only through Guzzle's standard HTTP client APIs are not expected to be affected. In affected forwarding or gateway scenarios, this may cause requests or credentials to be sent to an unintended host.Patches
The issue is patched in
2.10.2and later.1.xis end-of-life and will not receive a patch.Workarounds
If you cannot upgrade immediately, validate Host values before passing untrusted request data to
Message::parseRequest(), legacy 1.xparse_request(),ServerRequest::fromGlobals(), orServerRequest::getUriFromGlobals().Accept only
uri-host [ ":" port ]. Reject values containing whitespace, control characters, userinfo (@), path (/or\), query (?), fragment (#), malformed IP literals or bracket syntax, or invalid port syntax.Do not validate Host by prefixing it with
http://and passing it toparse_url(), because that can reinterpret malformed values as URI userinfo and host.References
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
guzzlehttp/psr7 has CRLF Injection via URI Host Component
CVE-2026-49214 / GHSA-hq7v-mx3g-29hw
More information
Details
Impact
guzzlehttp/psr7did 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 withGuzzleHttp\Psr7\Message::toString()or an equivalent custom serializer. Creating aUri,Request, or other PSR-7 object alone is not sufficient. The malformed host must be copied into the serializedHostheader without further validation.A vulnerable flow is:
UriorRequest.Hostheader.Hostheader.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 generatedHostheader to span multiple HTTP header lines.This is not the normal request-sending path used by
guzzlehttp/guzzle. Applications usingguzzlehttp/psr7only 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.2and later.1.xis 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
UriorRequestinstances. Reject input containing ASCII control characters, whitespace, or DEL, including CRLF, tab, space, NUL, or DEL characters: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
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
guzzlehttp/psr7: CRLF Injection in HTTP Start-Line Serialization
CVE-2026-55766 / GHSA-vm85-hxw5-5432
More information
Details
Impact
guzzlehttp/psr7did not reject CR/LF characters in certain first-party HTTP start-line fields: the request method, protocol version, and response reason phrase. If an application placed attacker-controlled data into one of those fields and later serialized the PSR-7 message as raw HTTP/1.x, for example withMessage::toString()or an equivalent serializer, the serialized message could contain attacker-controlled header lines. The issue can also be reached throughMessage::parseRequest()orMessage::parseResponse()when malformed raw messages are parsed into first-party PSR-7 objects and then serialized again.Creating or modifying a
Request,Response, or other PSR-7 object alone is not sufficient. The issue requires the malformed message to be serialized and written to the network, forwarded, replayed, or otherwise processed by software that does not independently reject the malformed start line. This is not the normal request-sending path used byguzzlehttp/guzzle; applications usingguzzlehttp/psr7only 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 messages, forward raw HTTP messages, or use custom transports, proxying, crawling, webhook delivery, testing, or similar code. Depending on how downstream HTTP/1.1 components parse the serialized message, this may lead to header injection, response splitting, request smuggling, or cache poisoning.
Patches
The issue is patched in
2.12.1and later. Starting in that release,guzzlehttp/psr7rejects CR/LF characters in HTTP method, protocol version, and response reason phrase values before storing them in first-party message objects.Workarounds
If you cannot upgrade immediately, reject CR/LF in untrusted method, protocol version, and reason phrase values before constructing or modifying PSR-7 messages.
Applications that parse, forward, replay, or serialize raw HTTP messages cannot work around the parser entry points by validating only after parsing. They should validate the raw start line before calling
Message::parseRequest()orMessage::parseResponse(), avoid reparsing untrusted raw messages, or upgrade. If an application runs with attacker-controlled synthetic$_SERVERvalues, validateREQUEST_METHODandSERVER_PROTOCOLbefore callingServerRequest::fromGlobals().Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
guzzlehttp/psr7: Host Confusion via Weak URI Host Validation
CVE-2026-59882 / GHSA-c2w2-prh8-qm98
More information
Details
Impact
guzzlehttp/psr7did not reject URI host components containing authority delimiters (/,?,#,@, or\), an embedded port such ashost:8080, or IPv6 brackets that do not frame the host (such as[::1or::1]).Uri::assertValidHost()rejected only control characters, so these malformed hosts were accepted both when parsing a URI string — including throughnew Uri(), an absolute-form request target passed toMessage::parseRequest(), and the syntheticSERVER_NAMEorSERVER_ADDRfallback used byServerRequest::fromGlobals()— and when setting a host withUri::withHost(). Because the stored host was not validated,Uri::getHost()could return a value that does not agree with the URI's authority or with the host that is actually used on the wire. For example,Uri::withHost('good.com@evil.com')is accepted, andnew Uri('http://[gggg::1]/')produces agetHost()of'[gggg:'whilegetAuthority()returns'[gggg::1'.You are affected if your application builds a
Urior callsUri::withHost()with host data that is wholly or partly attacker-controlled and then relies onUri::getHost()for a security or routing decision, such as host allowlisting or denylisting, an SSRF guard, cookie scoping, or proxy-bypass selection. You are also affected if you parse, forward, proxy, or re-serialize URIs that come from untrusted raw HTTP messages or from synthetic$_SERVERvalues. BecausegetHost()can then disagree with the real connection target, the concrete impact depends on how your application and any downstream HTTP/1.x component use the URI, and may include host-based access-control bypass, server-side request forgery, routing to an unintended host, orHostheader confusion. You are not affected if every host you place into aUriis already trusted and well formed.Applications using
guzzlehttp/guzzleare affected in the same way through Guzzle's use of PSR-7. Guzzle derives the requestHostheader from the request URI, and its cookie matching andno_proxyproxy-bypass matching both readUri::getHost(). An application that builds a Guzzle request URI from attacker-controlled host input can therefore have itsHostheader, cookie scope, or proxy-bypass decision computed against a host that differs from the one Guzzle connects to. This is not the normal request-sending path, and an application that passes only trusted, well-formed URIs to Guzzle and never builds a request URI from attacker-controlled host input is not affected through Guzzle's standard client APIs.Patches
The issue is patched in
2.12.3and later. Starting in that release,guzzlehttp/psr7rejects URI host components that contain authority delimiters, an embedded port, or IPv6 brackets that do not frame the host, both when parsing a URI and viaUri::withHost(), soUri::getHost()agrees with the URI authority. A framed bracketed literal whose contents are not a valid IPv6 address is preserved rather than rejected, sogetHost()still agrees with the authority.Workarounds
If you cannot upgrade immediately, validate and normalize host values before you build or modify a
Urifrom untrusted input, and do not treatUri::getHost()as a trust boundary for a host you have not independently checked. Before passing a host toUri, reject any value that contains/,?,#,@, or\, that contains a colon outside a bracketed IPv6 literal, or that has unbalanced brackets. Applications that parse, forward, replay, or re-serialize raw HTTP messages, or that run with attacker-controlled$_SERVERvalues, should validate the host before callingMessage::parseRequest()orServerRequest::fromGlobals(), and should avoid reparsing untrusted input.References
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
guzzle/psr7 (guzzlehttp/psr7)
v2.12.3Compare Source
Security
getHost()matches the URI authority (GHSA-c2w2-prh8-qm98)v2.12.2Compare Source
Fixed
v2.12.1Compare Source
Security
v2.12.0Compare Source
Deprecated
Query::build()that guzzlehttp/psr7 3.0 rejectsUtils::streamFor(); cast them to a string for 3.0Uri::withQueryValues()values; cast them to a string for 3.0v2.11.1Compare Source
Fixed
v2.11.0Compare Source
Changed
Utils::modifyRequest()to reject conflicting URI andHostheader changes in the same callHeader::parse()to split semicolon-separated parameters without repeated regular expression lookaheadsUriComparator::isCrossOrigin()so only HTTP and HTTPS missing ports receive implicit default portsDeprecated
Utils::modifyRequest()change values that guzzlehttp/psr7 3.0 will rejectFixed
Utils::copyToStream()to retry short destination writes instead of dropping the unwritten remainderHeader::parse()splitting of semicolon-separated parameters with escaped quotesv2.10.4Compare Source
Fixed
UriNormalizerpercent-encoding normalizations to URI fragmentsLimitStream::getSize()return0for slices past the underlying stream endAppendStream::read()return an empty string when no streams are attachedCachingStream::read()throw on an incomplete cache-target write instead of silently corrupting replaysCachingStream::seek()from looping indefinitely when the remote stream makes no progressv2.10.3Compare Source
Fixed
v2.10.2Compare Source
Security
Fixed
ServerRequest::fromGlobals()robust against unexpected HTTP header value types in$_SERVERv2.10.1Compare Source
Fixed
Utils::modifyRequest()with numeric header namesv2.10.0Compare Source
Changed
ServerRequest::fromGlobals()against malformed$_SERVERvaluesStreamWrapper::getResource()cannot create a resourceUtils::modifyRequest()UriResolver::resolve()Uri::__toString()side-effect-freev2.9.1Compare Source
Fixed
CachingStream::detach()returning an incomplete resource before the decorated stream has been fully readMessage::bodySummary()returningnullwhen truncating printable UTF-8 bodies inside a multibyte characterv2.9.0Compare Source
Added
MultipartStream@return statictoMessageTraitmethodsChanged
v2.8.1Compare Source
Fixed
+signs inUri::withQueryValue()andUri::withQueryValues()to prevent them being interpreted as spacesConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.