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:
	protected function addFileHeader($name,$zipMethod){
		$name = preg_replace('/^\\/+/', '', $name);
		$nlen = strlen($name);
		$time        = $this->dosTime(time());
        $fields = array(
            array('V', static::FILE_HEADER_SIGNATURE),
            array('v', static::ZIP_VERSION_64),			// 压缩版本
            array('v', 0b00001000),						// General purpose bit flags - data descriptor flag set
            array('v', $zipMethod),							// Compression method
            array('V', $time),							// Timestamp (DOS Format)
            array('V', 0x00000000),						// CRC32 of data (0 -> moved to data descriptor footer)
            array('V', 0xFFFFFFFF),						// zip64时全0
            array('V', 0xFFFFFFFF),						// Length of original data (Forced to 0xFFFFFFFF for 64bit extension)
            array('v', $nlen),							// Length of filename
            array('v', 32),								// Extra data (32 bytes)
        );	
        $fields64 = array(
            array('v', 0x0001),							// 64Bit Extension
            array('v', 28),								// 28bytes of data follows 
            array('P', 0x0000000000000000),				// Length of original data (0 -> moved to data descriptor footer)
            array('P', 0x0000000000000000),				// Length of compressed data (0 -> moved to data descriptor footer)
            array('P', 0x0000000000000000),				// Relative Header Offset
            array('V', 0x00000000)						// Disk number
        );
		$header = $this->packFields($fields);
		$header64 = $this->packFields($fields64);
		$this->send($header . $name . $header64);
		return strlen($header) + $nlen + strlen($header64);
	}