libcurl is a command-line transfer library that supports DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP and other. It is used to transfer data via URLs. Are you prepared? It is vulnerable since the first commit we recorded and it was fixed in 7.58.0 version.
The tool has some problems, one of which is an authentication leak.
According to the security advisory, the library can leak authentication data to third parties because of how it handles custom headers in HTTP requests.
“When asked to send custom headers in its HTTP requests, libcurl will send that set of headers first to the host in the initial URL but also, if asked to follow redirects and a 30X HTTP response code is returned, to the host mentioned in URL in the `Location:` response header value”, the advisory states.
This vulnerability allows impersonating the libcurl-using client’s request and leaks authorizations in a malicious context.
CVE-2018-1000007 has been present since “before curl 6.0”, the advisory states – meaning it goes back to before September 1999: Indeed, the advisory ‘fesses up that “It existed in the first commit we have recorded in the project”.
The second issue, CVE-2018-1000005, is described as an “HTTP/2 trailer out-of-bounds read”. The advisory says “reading an HTTP/2 trailer could mess up future trailers since the stored size was one byte less than required.”
“When accessed, the data is read out of bounds and causes either a crash or that the (too large) data gets passed to the libcurl callback. This might lead to a denial-of-service situation or an information disclosure if someone has a service that echoes back or uses the trailers for something.”
The last one only exists in libcurl versions between 7.49.0 to 7.57.0, experts are not aware of any exploit of this vulnerability in the wild.
The updated to the 7.58.0 version is needed.
Pedro Tavares is a professional in the field of information security working as an Ethical Hacker/Pentester, Malware Researcher and also a Security Evangelist. He is also a founding member at CSIRT.UBI and Editor-in-Chief of the security computer blog seguranca-informatica.pt.
In recent years he has invested in the field of information security, exploring and analyzing a wide range of topics, such as pentesting (Kali Linux), malware, exploitation, hacking, IoT and security in Active Directory networks. He is also Freelance Writer (Infosec. Resources Institute and Cyber Defense Magazine) and developer of the 0xSI_f33d – a feed that compiles phishing and malware campaigns targeting Portuguese citizens.
Read more here.