Language: PHP
Label: vulnerable
CWE: CWE-918 \u2014 Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

Code:
  function privReadEndCentralDirZip4G(&$p_central_dir){
    $zip = fopen($this->zipname,'rb');
    $from   = $p_central_dir['offset'];
    $size   = filesize($this->zipname);
    while($from < $size){
      fseek($zip,$from);
      $sign = unpack('Vid',@fread($zip, 4));
      //debug_out($from,$sign,0x02014b50);
      if($sign['id'] == 0x02014b50){
        $p_central_dir['offset'] = $from;
        break;
      }else{
        $from = $from + 0xFFFFFFFF + 1;//
      }
    }
    fclose($zip);
    return 1;
  }