Note: articles are for educational purposes and are not professional security advice — consult an expert for your specific needs.

Curl Heap-based Buffer Overflow and Cookie Injection Fix

In short

Curl 8.4.0 fixes CVE-2023-38545, a SOCKS5 heap-based buffer overflow, and CVE-2023-38546, a cookie injection flaw. They affect libcurl 7.69.0 to 8.3.0 and 7.9.1 to 8.3.0, respectively. Upgrade to 8.4.0; disabling the SOCKS5 proxy feature mitigates CVE-2023-38545.

Summary written with AI from this article, and checked against it.

Understanding and Mitigating the Latest Curl Security Vulnerabilities

Affected systems and impact

FlawAffected systemsImpact
CVE-2023-38545Overly long hostname copied into a heap buffer during the SOCKS5 proxy handshakelibcurl 7.69.0 to 8.3.0 when connecting to a SOCKS5 proxyArbitrary code execution on the target system
CVE-2023-38546Cookie injectionlibcurl 7.9.1 to 8.3.0An attacker could insert cookies into a running program that uses libcurl

At a glanceCVE-2023-38545

CVE-2023-38545 has a CVSS 3.1 base score of 9.8 (Critical) from NVD, and 8.8 (High, CVSS 3.1) from CISA. It is fixed in Haxx libcurl 8.4.0. Ubuntu 24.04 fixed it in curl 8.2.1-1ubuntu3.1. Debian bookworm fixed it in curl 7.88.1-10+deb12u15.

Severity9.8 Critical (CVSS 3.1, NVD) · 8.8 High (CVSS 3.1, CISA)
Fixed inHaxx libcurl 8.4.0
AffectedHaxx libcurl 7.69.0 – before 8.4.0
ExploitedNot in CISA's Known Exploited Vulnerabilities catalog
EPSS79% chance of exploitation in the next 30 days (FIRST, October 27, 2026)
Public exploit8 GitHub repositories name it: proofs of concept, scanners, detections. Unverified: some are fake or malicious.
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
WeaknessCWE-787 Out-of-bounds Write
Ubuntu24.04 noble curl: Fixed (8.2.1-1ubuntu3.1) · 22.04 jammy curl: Fixed (7.81.0-1ubuntu1.14) · 20.04 focal curl: Not affected · 18.04 bionic curl: Not affected · 16.04 xenial curl: Not affected · 14.04 trusty curl: Not affected
Debianbookworm curl: Fixed (7.88.1-10+deb12u15) · trixie curl: Fixed (8.14.1-2+deb13u5) · forky curl: Fixed (8.22.0-1) · sid curl: Fixed (8.23.0-1)
Red HatFixed: RHEL 9 (RHSA-2023:5763, RHSA-2023:6745, RHSA-2023:5763, RHSA-2023:6745), RHEL 9.0 Extended Update Support (RHSA-2023:5700)
Also inFedoraproject fedora, Netapp active iq unified manager, Netapp oncommand insight, Netapp oncommand workflow automation, Microsoft windows 10 1809, Microsoft windows 10 21h2

Is there a public exploit for CVE-2023-38545?

Public code exists as of October 28, 2026: 8 public GitHub repositories name it (proofs of concept, scanners and detections). It is not in CISA's Known Exploited Vulnerabilities catalog. None of it is verified: some such repositories are fake or carry malware, so read the code before running it, and only against systems you own. FIRST's EPSS puts the chance of exploitation in the next 30 days at 79%, higher than 99.5% of scored CVEs.

From NVD, Ubuntu, Debian, Red Hat · checked October 28, 2026

At a glanceCVE-2023-38546

CVE-2023-38546 has a CVSS 3.1 base score of 3.7 (Low) from NVD. It is fixed in Haxx libcurl 8.4.0. Ubuntu 26.04 fixed it in curl 8.2.1-1ubuntu3.1. Debian bookworm fixed it in curl 7.88.1-10+deb12u15.

Severity3.7 Low (CVSS 3.1, NVD)
Fixed inHaxx libcurl 8.4.0
AffectedHaxx libcurl 7.9.1 – before 8.4.0
ExploitedNot in CISA's Known Exploited Vulnerabilities catalog
EPSS6.0% chance of exploitation in the next 30 days (FIRST, October 27, 2026)
Public exploitNone listed by NVD or on GitHub
VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Ubuntu26.04 resolute curl: Fixed (8.2.1-1ubuntu3.1) · 24.04 noble curl: Fixed (8.2.1-1ubuntu3.1) · 22.04 jammy curl: Fixed (7.81.0-1ubuntu1.14) · 20.04 focal curl: Fixed (7.68.0-1ubuntu2.20) · 18.04 bionic curl: Fixed (7.58.0-2ubuntu3.24+esm2) · 16.04 xenial curl: Fixed (7.47.0-1ubuntu2.19+esm10)
Debianbookworm curl: Fixed (7.88.1-10+deb12u15) · trixie curl: Fixed (8.14.1-2+deb13u5) · forky curl: Fixed (8.22.0-1) · sid curl: Fixed (8.23.0-1)
Red HatFixed: RHEL 8 (RHSA-2024:1601), RHEL 8.6 Extended Update Support (RHSA-2023:6292), RHEL 8.8 Extended Update Support (RHSA-2023:7540), RHEL 9 (RHSA-2023:5763, RHSA-2023:6745, RHSA-2023:5763, RHSA-2023:6745) · RHEL 6: Out of support scope, RHEL 7: Out of support scope

Is there a public exploit for CVE-2023-38546?

No public exploit is listed as of October 28, 2026: NVD lists no exploit reference, no public GitHub repository names it, and it is not in CISA's Known Exploited Vulnerabilities catalog. FIRST's EPSS puts the chance of exploitation in the next 30 days at 6.0%, higher than 93.2% of scored CVEs.

From NVD, Ubuntu, Debian, Red Hat · checked October 28, 2026

Security vulnerabilities pose a persistent risk in the realm of software development and usage. Most recently, two critical vulnerabilities were identified in the Curl data transfer library, which has a massive install base. These vulnerabilities have been patched, but understanding them is crucial for anyone relying on Curl for file transfers over network protocols. This blog post offers an in-depth look at these vulnerabilities, their associated risks, and the steps to mitigate them effectively.

Risk Scoring

Understanding CVSSv3 Scores

The Common Vulnerability Scoring System (CVSS) is a universal framework that allows for the standardization of vulnerability risk assessment. In this case, the two vulnerabilities have been assigned CVSSv3 scores. CVE-2023-38545 has been assigned a score of 7.5, making it a high-severity vulnerability. On the other hand, CVE-2023-38546 has a moderate severity level with a score of 5.0.

Vulnerability Details

CVE-2023-38545: Heap-based Buffer Overflow

Described as the worst Curl security flaw in recent memory by the project's lead developer, this vulnerability is particularly concerning. It manifests as a heap-based buffer overflow during the SOCKS5 proxy handshake. The flaw enables an attacker to execute arbitrary code on the target system. The root of this vulnerability lies in how Curl handles hostnames during a SOCKS5 handshake. A bug results in the copying of an overly long hostname into the target buffer instead of the resolved address.

Conditions for Exploit

This vulnerability can be exploited only under specific conditions. For an attack to be successful, Curl needs to be utilized for connecting to a SOCKS5 proxy. It makes the likelihood of this exploit relatively less but still a concern that cannot be ignored.

This is a cookie injection vulnerability in Curl that could potentially allow an attacker to insert cookies into a running program that utilizes libcurl. However, for this vulnerability to be exploited, a specific series of conditions must be met, adding a layer of complexity to the exploit.

Affected Products

For CVE-2023-38545, libcurl versions 7.69.0 to and including 8.3.0 are affected. Meanwhile, CVE-2023-38546 affects libcurl versions ranging from 7.9.1 to 8.3.0.

Solution and Recommendations

Patch Availability

The most immediate step users should take is upgrading to Curl version 8.4.0, where patches for both vulnerabilities have been included.

Disabling the SOCKS5 Proxy Feature

Given the nature of CVE-2023-38545, one mitigation strategy is disabling the SOCKS5 proxy feature in Curl. It adds a security layer by eliminating one of the conditions required for the vulnerability to be exploited.

Exercise Caution With Proxies

If the SOCKS5 proxy feature is essential for your operations, exercise caution in selecting which SOCKS5 proxies to use. Doing so can minimize the risk associated with these vulnerabilities.

Final Thoughts

Security is a continually evolving field, and staying updated is crucial. The vulnerabilities in Curl, due to its widespread usage, could have had far-reaching implications. By understanding these vulnerabilities and applying the recommended patches and best practices, users can significantly mitigate the associated risks. Given the critical role Curl plays in internet communications, these measures are not just advisable but essential.

Sources

  1. CVE recordCVE-2023-38545 in the National Vulnerability Database · nvd.nist.gov
  2. CVE recordCVE-2023-38546 in the National Vulnerability Database · nvd.nist.gov
Vishal

About the author

· Software & security engineer

GitHub · LinkedIn · X

Vishal writes Trickyworld's tutorials and interview-preparation guides on programming, databases, cyber security and AI. Vishal has been shipping production software long enough to have firm opinions about Python, PHP, Node.js, and JavaScript, and to have been wrong about each of them at least once. The work has run the whole stack: Drupal and Laravel applications, React front ends, MySQL and MongoDB underneath, Redis and Memcached for the things that had to be fast, Apache Solr for the things that had to be findable. That last part turned out to matter more than anyone expected. Tune a Solr index for a season, then watch a language model confidently retrieve the wrong document, and you recognise an old problem wearing new clothes. Most of what is hard about AI systems is not the model. It is retrieval, caching, latency budgets, and deciding what the system does when the answer comes back wrong — which is work he has been doing since well before anyone called it AI engineering. He plays a lot of games, which is less a hobby disclosure than an admission of where a good share of his engineering instinct came from. Real-time systems with a frame budget. State that has to stay coherent while a player does something no designer anticipated. The permanent question of what happens when the frame cannot finish in time. Those habits carry over more directly than they have any right to. He has written several books on programming, all built on the same conviction: most technical writing is unclear because the author never decided what to leave out. More from Vishal → · Editorial policy

#security vulnerabilities#CVE-2023-38545#CVE-2023-38546#SOCKS5 proxy#code execution#Buffer Overflow#cURL#libcurl#Patched

More on Computer Tricks.

Latest articles

$ subscribe --weekly

Get the next tutorial in your inbox.

Programming, security and AI — the practical bits, no spam. Unsubscribe any time.