Re: SSRF protection in curl

From: Date: Tue, 10 Nov 2026 11:42:15 +0000
Subject: Re: SSRF protection in curl
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-133054@lists.php.net to get a copy of this message
Le jeudi 15 octobre 2026, 10:47:39 heure normale d’Europe centrale Sjoerd Langkemper a écrit : > If an application performs HTTP requests based on user input, it is often desirable to verify > that the connection is done to an allowed host. Otherwise the functionality could be abused to > request resources on the server or on the same network as the server (SSRF). > > Xavier Leune made some pull requests to make this possible in curl. The idea is to hook in a > callback that can verify the IP address that curl is going to connect to. Yes please! This is something we’ve been missing in our codebase as well, and used the same trick as Symfony to hook into DNS resolution, but that has been an issue in the past, with some string looking like domains while actually being IPs going through to curl. It would help a lot to have a standard way of hooking into curl to check which IP is actually about to be contacted.

Attachment: [application/pgp-signature] This is a digitally signed message part. signature.asc
« previous php.internals (#133054) next »