Update dependency guzzlehttp/psr7 to v2 [SECURITY]#13
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
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.10.2guzzlehttp/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).
Release Notes
guzzle/psr7 (guzzlehttp/psr7)
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.