Event

TGIT
1/8

Video

IBM
2/8

Quiz

Quiz
3/8

Award

cnapp-v3
4/8

eBook

cnapp-v3
5/8

What's New?

AI icon

Don't just use AI,
Secure AI with AccuKnox AI-SPM!

PRODUCT TOUR
6/8

Blog

mssp

Why is AccuKnox the most MSSP ready CNAPP?

LEARN MORE
7/8

Comparison

Comparison

Searching for Alternative CNAPP?

COMPARE NOW
8/8
CVE-2023-38545

CVE-2023-38545: Complete Analysis and Mitigation Guide

 |  July 29, 2025

A critical heap buffer overflow (CVE-2023-38545) in cURL and libcurl affects versions 7.69.0 to 8.3.0, specifically when using SOCKS5 proxies. This vulnerability, with a CVSS score of 9.8, could lead to arbitrary code execution or system crashes due to improper memory handling of hostnames.

Reading Time: 9 minutes

TL;DR:

  • CVE-2023-38545 is a critical heap buffer overflow in cURL/libcurl.
  • It affects versions 7.69.0 to 8.3.0 when using SOCKS5 proxies.
  • Impact includes potential remote code execution (RCE) or system crashes.
  • Mitigation: Update to cURL/libcurl 8.4.0+, or disable SOCKS5 proxy usage if unable to update.
  • Importance: Widespread impact due to cURL’s pervasive use in billions of devices and cloud environments.

In October 2023, a critical software vulnerability was discovered in a tool called cURL. This vulnerability, identified as CVE-2023-38545, affects both the cURL command-line utility and its underlying library, libcurl.

cURL is used to transfer data over networks using protocols like HTTP, HTTPS, FTP, and others. It is included in many operating systems and software applications, especially in cloud environments security.

This vulnerability focuses on how cURL interacts with SOCKS5 proxies. When cURL is configured to use a SOCKS5 proxy, it may incorrectly handle certain network requests in a way that allows an attacker to interfere with memory on the system.

This article provides a detailed explanation of CVE-2023-38545, how it works, which systems are affected, and how organizations can reduce the risk it poses.

What is CVE-2023-38545?

CVE-2023-38545 is a heap buffer overflow vulnerability in cURL and libcurl. It occurs during the SOCKS5 proxy handshake process when cURL is configured to pass a hostname to the proxy for resolution.

Under specific conditions, cURL may incorrectly copy a hostname into memory without checking if it exceeds the expected length. This creates a scenario where data is written beyond the allocated memory buffer, potentially allowing attackers to execute arbitrary code or crash the program.

  • CVE ID: CVE-2023-38545
  • Discovery Date: October 2023
  • CVSS Score: 9.8 (Critical)
  • Severity: High

The vulnerability is linked to the way cURL manages proxy settings using the –socks5-hostname option or similar configurations in software that uses libcurl. If an attacker controls the input URL or intercepts traffic, they may leverage this flaw to exploit systems that include the vulnerable versions of cURL or libcurl.

cURL is widely used across different platforms, including Linux, Windows, and macOS. The potential impact of this vulnerability is broad due to its frequent embedding in scripts, system utilities, and cloud-native applications.

buffer overflow attack

Why does this vulnerability matter?

CVE-2023-38545 is important because cURL exists in billions of devices and systems worldwide. cURL transfers data between computers, applications, and services. It’s built into operating systems, cloud services, and development tools.

This widespread use means a flaw in cURL can affect many systems at once. The vulnerability allows a heap buffer overflow, which can cause unexpected system behavior. In some cases, it enables remote code execution (RCE), where attackers run their own code on someone else’s computer.

  • Widespread impact: cURL is used in billions of installations worldwide
  • Security risk: Allows memory corruption that could lead to system crashes or code execution
  • Supply chain concern: Affects many applications that include cURL as a component

cURL is also embedded in many other programs. When software includes cURL in its code, a vulnerability in cURL affects that software too. This process creates a ripple effect through the software supply chain.

Which versions are vulnerable

The vulnerability affects specific versions of cURL and libcurl:

Status cURL/libcurl Versions
Vulnerable 7.69.0 to 8.3.0
Not Vulnerable Before 7.69.0 and 8.4.0+

Many operating systems include cURL by default. If your system has a version between 7.69.0 and 8.3.0, it may be vulnerable to CVE-2023-38545.

Examine the curl or libcurl4 packages on Linux systems such as Debian and Ubuntu. For Red Hat and CentOS, any system with cURL versions in the vulnerable range needs updating. macOS users should check both system cURL and any version installed through package managers like Homebrew.

To check your cURL version, open a terminal or command prompt and type:

curl -version

This command shows which version is installed on your system.

How attackers exploit CVE-2023-38545

The exploitation of this vulnerability happens in a specific way that involves proxy connections and memory management.

The SOCKS5 proxy handshake problem

Attackers exploit CVE-2023-38545 by manipulating how cURL communicates with a SOCKS5 proxy. During the connection process, attackers can send specially crafted data that causes cURL to handle memory incorrectly.

SOCKS5 is a protocol that routes network traffic through a proxy server. When cURL connects to this type of proxy, it performs a handshake to establish the connection.

  • Technical issue: cURL incorrectly manages memory when handling hostnames longer than 255 bytes
  • Root cause: A programming error in how cURL switches between local and remote hostname resolution
  • Trigger condition: When using SOCKS5 proxies with the hostname resolution option enabled

The vulnerability occurs when cURL stores too much data in a memory space that’s too small. This heap buffer overflow can corrupt adjacent memory, potentially allowing attackers to control program execution.

socks5traffic

From vulnerability to code execution

Under certain conditions, attackers can use this overflow to run their code on the affected system. Numerous proof-of-concept demonstrations illustrate the process of triggering the vulnerability.

For successful exploitation, the system must:

  1. Use a vulnerable version of cURL (7.69.0 to 8.3.0)
  2. Be configured to use a SOCKS5 proxy
  3. Process a hostname that exceeds the expected length

These conditions expose the system to potential attacks that could result in unauthorized access or control.

Impact on cloud environments

CVE-2023-38545 particularly affects modern computing environments where cURL is commonly used for automation and connectivity.

In containerized environments like Docker and Kubernetes, cURL often performs health checks, downloads updates, and calls APIs. Containers using SOCKS5 proxies with vulnerable cURL versions face increased risk.

Microservices architectures frequently use proxies for communication between services. If these proxies are SOCKS5 and the services use vulnerable cURL versions, they may be susceptible to exploitation.

Common components that might include vulnerable cURL:

  • Application containers
  • CI/CD pipelines
  • Cloud virtual machines
  • Serverless functions

The vulnerability becomes especially concerning in environments where components automatically update or download resources using cURL. If these operations use SOCKS5 proxies, they could become attack vectors.

How to fix CVE-2023-38545

Addressing this vulnerability involves updating software and potentially changing configurations.

Update to a secure version

The most effective solution is installing cURL or libcurl version 8.4.0 or later. This version fixes the vulnerability in the SOCKS5 proxy handshake process.

For different systems, use these commands:

  • Debian/Ubuntu: sudo apt update && sudo apt install curl libcurl4
  • ed Hat/CentOS: sudo yum update curl libcurl
  • macOS (Homebrew): brew upgrade curl

After updating, verify the installation with:

curl –version

This shows if you have a safe version (either below 7.69.0 or 8.4.0 and above).

Disable unnecessary SOCKS5 proxy usage

If immediate updating isn’t possible, you can reduce risk by disabling SOCKS5 proxies when they aren’t needed.

Check for SOCKS5 configurations in:

  • Environment variables (http_proxy, https_proxy, all_proxy)
  • Application configuration files
  • Command-line parameters that include “socks5” or “socks5h”

You can prevent the vulnerability from triggering by removing or commenting out these settings. However, this may affect applications that rely on proxy connections.

categorize and prioritize top vulnerabilities

AccuKnox helps you categorize and prioritize your top vulnerabilities

Apply available patches

Operating system vendors have released security updates addressing this vulnerability. These updates can be accessed through the standard system update mechanisms:

  • Windows Update for Microsoft systems
  • Package managers for Linux distributions
  • System updates for macOS

If patching isn’t immediately possible, consider implementing network controls to limit proxy usage or monitor for suspicious proxy connections.

Detecting vulnerable systems

Finding and addressing vulnerable systems requires both scanning and monitoring approaches.

Vulnerability scanning

Vulnerability scanners can identify systems with vulnerable cURL versions. These tools check installed software against databases of known vulnerabilities.

For manual checking:

  • Run curl –version to see the installed version
  • Use ldd $(which curl) to check which libcurl version is linked to the curl binary
  • Search for applications that might bundle their own versions of libcurl

Enterprise environments can use automated scanning tools to check many systems at once and generate reports of vulnerable installations.

Runtime monitoring

Even after patching, monitoring helps detect potential exploitation attempts. Signs to watch for include:

  • Unexpected connections to SOCKS5 proxies
  • Abnormal program crashes related to memory corruption
  • Unusual network traffic patterns involving proxy servers

Security tools that monitor memory usage and network connections can alert when suspicious activity occurs. Such monitoring provides an additional layer of protection beyond patching.

why you need runtime security 1

AccuKnox offers best-in-class runtime security tooling for all of the above

Zero trust approach to vulnerability management

A zero trust security model helps manage vulnerabilities like CVE-2023-38545 by assuming no component is automatically trustworthy. This approach verifies every access request and continuously monitors all activity.

  • Principle of least privilege: Applications only get the minimum access they need
  • Continuous verification: All activities are checked against security policies
  • Microsegmentation: Systems are divided into secure zones to limit breach impact

This model helps contain potential exploitation by limiting what vulnerable components can access. Even if a system has the CVE-2023-38545 vulnerability, zero trust controls can reduce the potential damage from exploitation.

AccuKnox applies these principles through runtime protection and policy enforcement. Runtime monitoring observes application behavior and flags unusual actions that might indicate exploitation attempts.

auto discovery policy enforcement

Key takeaways about CVE-2023-38545

CVE-2023-38545 is a serious vulnerability in cURL and libcurl that affects how they handle SOCKS5 proxy connections. It involves a heap buffer overflow that could allow attackers to run unauthorized code.

The most effective solution is updating to cURL/libcurl version 8.4.0 or later. Systems with versions between 7.69.0 and 8.3.0 are vulnerable and should be updated.

When updates aren’t immediately possible, disabling SOCKS5 proxy configurations can reduce risk. The procedure includes removing relevant proxy settings in configuration files.

Monitoring systems helps identify exploitation attempts. This includes checking for vulnerable versions and watching for unusual behavior like unexpected crashes or network activity.

Zero trust security models can limit the impact of vulnerabilities by treating all components as potentially untrustworthy and verifying every action.

For comprehensive protection against vulnerabilities like CVE-2023-38545 in cloud environments, see the product tour of AccuKnox’s Zero Trust solution.

About AccuKnox

AppSec + CloudSec Platform

AccuKnox Zero Trust CNAPP has helped organizations to:

  • Detect and defend against zero-day attacks. CNAPP is specifically designed to operate in cloud-native and Kubernetes environments. 
  • Rapidly generate reports for daily, weekly, and monthly audits. 
  • Aggregate SAST, DAST, SCA, CSPM, CWPP, KIEM in one consolidated dashboard view

Please schedule your personalized AccuKnox demo.

FAQs about CVE-2023-38545

Does CVE-2023-38545 affect my system if I don’t use a SOCKS5 proxy?

No. This vulnerability only triggers when cURL or libcurl is configured to use a SOCKS5 proxy. Systems without this specific proxy configuration aren’t directly exposed to the vulnerability.

How can I verify that my system is protected against CVE-2023-38545?

Check your cURL version with the command curl –version. This vulnerability does not affect your system if it is version 7.69.0, 8.4.0, or higher.

Learn more: Apache OFBiz CVE Solved with AccuKnox

Ready for a personalized security assessment?

“Choosing AccuKnox was driven by opensource KubeArmor’s novel use of eBPF and LSM technologies, delivering runtime security”

idt

Golan Ben-Oni

Chief Information Officer

“At Prudent, we advocate for a comprehensive end-to-end methodology in application and cloud security. AccuKnox excelled in all areas in our in depth evaluation.”

prudent

Manoj Kern

CIO

“Tible is committed to delivering comprehensive security, compliance, and governance for all of its stakeholders.”

tible

Merijn Boom

Managing Director