Skip to content

MIR0807

TaintedSsrf

User-controlled input reaches a URL or host the server connects to (curl_init(), CURLOPT_URL, fsockopen(), get_headers(), new SoapClient()), letting an attacker make the server send requests to internal services.

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $_GET['url']); // TaintedSsrf

Build the URL from a fixed base, or check the host against an allowlist before connecting.