Hi,
|
if(preg_match('/^https?:\/\//i',$_POST['coverurl'])){ |
|
$data = @file_get_contents($_POST['coverurl']); |
allows an attacker to trigger a HTTP(S)-request to an arbitrary target via file_get_contents. This includes things like localhost. This is a vulnerability called Server-Side Request Forgery (SSRF).
SSRF can be used to exploit the local system, gain privileges and much more, depending on the deployment. Check out e.g. OWASP' material on SSRF for more information: https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/