CVE-2026-133750: CachingHttpClient Shares Responses Between Users When Credentials Are Set With withOptions()
Since Symfony 7.4, CachingHttpClient can cache the responses of HTTP clients, for example when caching is enabled in framework.httpclient. Its withOptions() method passes the options to the decorated client only. So credentials set with withOptions(), like authbearer, authbasic, an Authorization header or a Cookie header, reach the server, but CachingHttpClient doesn't see them. They're missing from the cache key. They also miss the rule that keeps a shared cache from storing the responses to requests with an Authorization header. A cacheable response fetched for one user is then served to the next users:
$client->withOptions(['authbearer' => $aliceToken])->request('GET', 'https://api.example.com/me'); // Alice's profile $client->withOptions(['authbearer' => $bobToken])->request('GET', 'https://api.example.com/me'); // Alice's profile, from the cache
Applications are affected when they enable caching on a client, set per-user credentials with withOptions(), and request URLs whose responses are cacheable. Credentials passed to request() aren't affected.
Most other options set with withOptions() were ignored too when caching was enabled, because CachingHttpClient forwarded each request with its own defaults. This includes maxredirects, proxy, peerfingerprint, localcert, timeout, onprogress and body.
CachingHttpClient::withOptions() now also merges the standard options into its own default options. The cache key, the rules of shared caches and the requests it forwards take them into account. Options that only decorated clients know, like maxretries, are still passed to them only.
Client certificates, proxies and authntlm are now part of the cache key too. When several HTTP clients of FrameworkBundle use the same cache pool, each client gets its own namespace in that pool. So clients with different custom headers don't get the responses of each other anymore.
Affected Software
Event History
Frequently Asked Questions
Which applications are affected?
Applications are affected when they enable caching on a Symfony HttpClient client, use withOptions() to set per-user credentials, and request URLs that return cacheable responses. Credentials supplied directly to request() are not affected.
What credentials can trigger cross-user response sharing?
The affected per-user credentials include auth_bearer, auth_basic, an Authorization header, and a Cookie header when they are set through withOptions(). These options reach the server but are omitted from the cache key.
Why can this expose one user's data to another user?
CachingHttpClient does not see credentials supplied through withOptions(), so it neither varies the cache key by those credentials nor applies the shared-cache rule for Authorization requests. A cacheable response retrieved using one user's credentials can therefore be returned for a later request using another user's credentials.
What can be done if caching cannot be removed immediately?
Pass credentials directly to request() rather than setting them with withOptions(). The provided advisory information states that credentials passed to request() are not affected.