NoPrivateNetworkHttpClient is meant to stop your app from sending requests into private networks. Apps use it against server-side request forgery (SSRF), where an attacker makes your server request places it shouldn't. Before this fix, it still leaked some information while resolving a host name, so an attacker could work out which internal IP addresses and ports exist.

Who is affected

Apps that wrap their HTTP client in Symfony\Component\HttpClient\NoPrivateNetworkHttpClient to fetch URLs that users can choose. Affected releases of symfony/http-client (and symfony/symfony) are 4.3.0 and later below 5.4.47, 6.x below 6.4.15, and 7.x below 7.1.8. Apps that don't use this class are not affected. Symfony rates it low: the leak is limited to address and port details.

What to do

Update to 5.4.47, 6.4.15 or 7.1.8. Symfony's advisory notes that 5.4.46, 6.4.14 and 7.1.7 shipped a first fix that was incomplete, so those releases are still affected. The fixes are here and here.

Reported by Linus Karlsson and Chris Smith.