Update dependency guzzlehttp/psr7 to v2 [SECURITY]#13
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
8382c31 to
139e701
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:
^1.8.2→^2.12.1guzzlehttp/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).
Release Notes
guzzle/psr7 (guzzlehttp/psr7)
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 spacesv2.8.0Compare Source
Added
Changed
v2.7.1Compare Source
Fixed
Changed
v2.7.0Compare Source
Added
Utils::redactUserInfo()methodQuery::buildv2.6.3Compare Source
Fixed
StreamWrapper::stream_stat()returnfalseif inner stream's size isnullChanged
v2.6.2Compare Source
Fixed
Changed
call_user_func*with native callsv2.6.1Compare Source
Fixed
v2.6.0Compare Source
Changed
application/octet-streamif we are unable to guess the content type for a multipart file uploadv2.5.1Compare Source
Fixed
.accfiles toaudio/aacChanged
v2.5.0Compare Source
Changed
psr/http-messageversion constraint to^1.1 || ^2.0v2.4.5Compare Source
Fixed
ServerRequest::normalizeNestedFileSpecMessage::bodySummarywhenpreg_matchfailsv2.4.4Compare Source
Changed
AllowDynamicPropertiesinLazyOpenStreamv2.4.3Compare Source
Changed
sha1(uniqid())bybin2hex(random_bytes(20))v2.4.2Compare Source
Fixed
v2.4.1Compare Source
Fixed
Message::bodySummaryv2.4.0Compare Source
Added
UriComparator::isCrossOriginmethodv2.3.0Compare Source
Fixed
Header::splitListmethodUtils::tryGetContentsmethodStream::getContentsmethodv2.2.2Compare Source
Fixed
Message::parseRequestUrifor numeric headersfreadinto runtime exceptionsv2.2.1Compare Source
Fixed
v2.2.0Compare Source
Added
Fixed
urimetadatadata://streamsHeader::normalize()v2.1.2Compare Source
See change log for changes.
v2.1.1Compare Source
Fixed
v2.1.0Compare Source
Changed
Uriobject from a malformed URI will no longer throw a genericInvalidArgumentException, but rather aMalformedUriException, which inherits from the formerfor backwards compatibility. Callers relying on the exception being thrown to detect invalid
URIs should catch the new exception.
Fixed
nullin caching stream size if remote size isnullv2.0.0Compare Source
Identical to the RC release.
v1.9.1Compare Source
See change log for changes.
v1.9.0Compare Source
See change log for changes.
v1.8.5Compare Source
See change log for changes.
v1.8.4Compare Source
See change log for changes.
v1.8.3Compare Source
See change log for changes.
Configuration
📅 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.