Descrizione
Since Symfony 5.4.48, 6.4.16, 7.1.9 and 7.2.0, NoPrivateNetworkHttpClient follows redirects itself, and sends each hop as a new request through the client it decorates. Before a redirect to another origin, it removes the Authorization and Cookie headers it knows about. But the decorated client then added its own default options again. These include the auth_basic, auth_bearer and auth_ntlm credentials, and the Authorization and Cookie headers it was created with. Credentials set with withOptions() on the decorator came back the same way, since the decorator forwards them to the decorated client. These credentials were then sent to any origin that a response redirected to, for example through an open redirect on the server the application calls. The decorated client alone doesn't send them. The decorator removed the ones passed to request(), but not auth_ntlm. Since Symfony 8.1, DnsResolvingHttpClient follows redirects the same way and is affected too. With auth_ntlm, curl started the NTLM handshake with the other origin, which could answer with a challenge to get the NTLM response of the application. On a redirect to another origin, the decorator now passes empty Authorization and Cookie headers and unsets the auth_basic, auth_bearer and auth_ntlm options. The decorated client then can't add its own. Decorators between NoPrivateNetworkHttpClient and the transport, like ScopingHttpClient or CachingHttpClient, can't add theirs either.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 8.2, EPSS 0.5% (percentile 35).
Versioni da aggiornare
- Symfony symfony/http-client: vulnerabili le versioni dalla
5.4.48precedenti alla5.4.57→ aggiornare alla5.4.57o successiva. - Symfony symfony/http-client: vulnerabili le versioni dalla
6.4.16precedenti alla6.4.51→ aggiornare alla6.4.51o successiva. - Symfony symfony/http-client: vulnerabili le versioni dalla
7.1.9precedenti alla7.4.24→ aggiornare alla7.4.24o successiva. - Symfony symfony/http-client: vulnerabili le versioni dalla
8.0.0precedenti alla8.1.12→ aggiornare alla8.1.12o successiva. - Symfony symfony/symfony: vulnerabili le versioni dalla
5.4.48precedenti alla5.4.57→ aggiornare alla5.4.57o successiva. - Symfony symfony/symfony: vulnerabili le versioni dalla
6.4.16precedenti alla6.4.51→ aggiornare alla6.4.51o successiva. - Symfony symfony/symfony: vulnerabili le versioni dalla
7.1.9precedenti alla7.4.24→ aggiornare alla7.4.24o successiva. - Symfony symfony/symfony: vulnerabili le versioni dalla
8.0.0precedenti alla8.1.12→ aggiornare alla8.1.12o successiva.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ruotare credenziali e chiavi, limitare l'accesso di rete al servizio e verificare accessi effettuati con credenziali predefinite.
- Verificare quali dati risultano esposti e ruotare eventuali segreti (token, password, chiavi) potenzialmente compromessi.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| Symfony | symfony/http-client | ≥ 5.4.48 < 5.4.57 | 5.4.57 |
| Symfony | symfony/http-client | ≥ 6.4.16 < 6.4.51 | 6.4.51 |
| Symfony | symfony/http-client | ≥ 7.1.9 < 7.4.24 | 7.4.24 |
| Symfony | symfony/http-client | ≥ 8.0.0 < 8.1.12 | 8.1.12 |
| Symfony | symfony/symfony | ≥ 5.4.48 < 5.4.57 | 5.4.57 |
| Symfony | symfony/symfony | ≥ 6.4.16 < 6.4.51 | 6.4.51 |
| Symfony | symfony/symfony | ≥ 7.1.9 < 7.4.24 | 7.4.24 |
| Symfony | symfony/symfony | ≥ 8.0.0 < 8.1.12 | 8.1.12 |