CVE-2023-38545 high severity vulnerability in cURL: everything you need to know

Detect and mitigate CVE-2023-38545, a high severity buffer overflow vulnerability in cURL. Organizations should upgrade to the patched version.

2 분 읽기

The cURL team published version 8.4.0 on October 11, 2023, after announcing that it includes a fix for a high severity vulnerability assigned CVE-2023-38545. This vulnerability is a buffer overflow flaw in the SOCKS5 proxy handshake. It is recommended to upgrade cURL to the patched version 8.4.0 or up. 

What is CVE-2023-38545? 

This flaw causes curl to overflow a heap-based buffer during the SOCKS5 proxy handshake. When curl is instructed to forward the hostname to the SOCKS5 proxy for address resolution instead of handling it internally, the maximum allowable length for the hostname is 255 bytes. 

If the hostname is identified as being longer than 255 bytes, curl switches to local name resolution and only passes the resolved address to the proxy. Unfortunately, due to a bug, the local variable responsible for instructing the host to resolve the name could receive an incorrect value during a slow SOCKS5 handshake. This, contrary to the intended behavior, leads to the entire excessively long hostname being copied to the target buffer instead of just the resolved address. A heap buffer overflow then occurs.  

Wiz Research: what’s the practical risk?      

Based on our initial assessment, the following observations can be made regarding CVE-2023-38545: 

  • To be susceptible to this vulnerability, an application must be using libcurl with a socks5 proxy and make a request to a malicious URL (such as in a webhook scenario). 

  • Since this is a memory corruption vulnerability, exploiting it beyond a Denial-of-Service attack may prove to be challenging. Furthermore, we are currently not aware of any Remote Code Execution exploit available for this issue. 

  • Taking these factors into account, we have reason to believe that at this time the likelihood of malicious exploitation of this vulnerability by threat actors in the wild is relatively low. 

  • It is important to note that due to the the fact that this vulnerability resides in a library, various applications could be utilizing libcurl in a vulnerable manner. As we compile a list of such applications, we will provide updates in this post, especially highlighting those of significant concern. 

Which products are affected? 

This vulnerability impacts libcurl 7.69.0 to and including 8.3.0. 

Which actions should security teams take? 

It is recommended to upgrade cURL to version 8.4.0. 

For Windows instances, it is recommended to wait for an official Microsoft patch, as manually patching cURL can disrupt the Windows update. 

While the official solution for this flaw is to apply the patch, the cURL team also offered the following mitigations: 

  • Do not use CURLPROXY_SOCKS5_HOSTNAME proxies with curl 

  • Do not set a proxy environment variable to socks5h:// 

Wiz customers can use the pre-built query and advisory in the Wiz Threat Center to search for vulnerable instances in their environment. 

 

References 

계속 읽기

Wiz magic shifts left

Fixing vulnerabilities and misconfigurations in the pipeline before deployment makes perfect sense - it reduces the overall threat footprint and saves time. Wiz offers customers a straightforward way to operationalize a Shift Left strategy.

맞춤형 데모 받기

맞춤형 데모 신청하기

“내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다.”
데이비드 에슬릭최고정보책임자(CISO)
“Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다.”
아담 플레처최고 보안 책임자(CSO)
“우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다.”
그렉 포니아토프스키위협 및 취약성 관리 책임자