Patchfirst
CVE-2023-38545 Public exploit High · 8.8 EPSS 78.7%

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake

curl · curl

Summary

The flaw is a heap-based buffer overflow in curl's SOCKS5 proxy handshake code, where a local variable controlling whether the proxy resolves the host name can take the wrong value during a slow handshake, causing an overlong host name to be copied into a heap buffer instead of only the resolved address. An attacker who can supply or influence the host name in a URL that curl is asked to fetch through a SOCKS5 proxy can trigger the overflow, which requires the victim (user interaction) to have curl operate on that URL and a SOCKS5 proxy with host-name resolution to be in use.

Official description · CVE.org

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. When curl is asked to pass along the host name to the SOCKS5 proxy to allow that to resolve the address instead of it getting done by curl itself, the maximum length that host name can be is 255 bytes. If the host name is detected to be longer, curl switches to local name resolving and instead passes on the resolved address only. Due to this bug, the local variable that means "let the host resolve the name" could get the wrong value during a slow SOCKS5 handshake, and contrary to the intention, copy the too long host name to the target buffer instead of copying just the resolved address there. The target buffer being a heap based buffer, and the host name coming from the URL that curl has been told to operate with.

Breakdown
37.0 / 100
Exploited
Not confirmed
Reports
1
Tactics
1/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. What they do

Public exploit code (PoC-in-GitHub) was available 7 days before disclosure.

  1. Public exploit codePoC-in-GitHub7 days before
  2. Disclosedday 0

techniques

1 , grouped by in kill-chain order, 2 cited passages 1

ExecutionTA0002

Exploitation for Client Execution T1203 Medium
AI mapping from the description · primary impact

Overflow executes when curl processes attacker URL

The target buffer being a heap based buffer, and the host name coming from the
From the official description (CVE.org) Original (opens in a new tab) ↗
Lower-confidence links (1)

These come from early or generic mappings, text matching, or contradict this CVE’s details (for example a public-facing technique on a bug that needs a user to open a file). Shown for completeness.

  • Exploit Public-Facing ApplicationT1190 needs user interaction; not a public-facing exploit

Detection

0 rules for this CVE · 35 general rules for its techniques

Rules for this CVE

0 that reference CVE-2023-38545 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

General rules for this CVE’s techniques

These detect the technique in general, not this specific vulnerability.

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

What security researchers reported

Named in 1 threat report
1 reportCisco

Reports are matched by finding the exact id CVE-2023-38545 in their text; nobody has reviewed the match. One passage is shown per report, at most 320 characters, linked to the original.

References

21 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close