---
id: "CVE-2026-92388"
kind: "vulnerability"
aliases: ["CVE-2026-92388"]
title: "libcurl: failed FTP wildcard LIST leaves handle state corrupt, enabling memory corruption"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["c", "c++", "ftp", "libcurl", "package", "self-hosted"]
not_affected_if: ["no-ftp-wildcard", "no-handle-reuse"]
published_at: "2026-10-20T21:17:21+00:00"
first_seen_at: "2026-10-23T21:57:21+00:00"
updated_at: "2026-10-25T05:04:24+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-92388", "first_seen_at": "2026-10-23T21:57:21+00:00"}]
---

# libcurl: failed FTP wildcard LIST leaves handle state corrupt, enabling memory corruption

When an FTP wildcard LIST fails, libcurl keeps its internal listing parser as the write callback, so reusing or duplicating the easy handle crashes the process or reads freed memory. Changing only CURLOPT_WRITEDATA after such a failure can make the parser write server response bytes into application memory.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `curl --version` to see the libcurl version in use
- Search application code for FTP wildcard transfers (CURLOPT_WILDCARDMATCH) combined with curl_easy_duphandle or reused easy handles
- unknown whether other checks apply; the sources do not list a configuration check

## Fix

- Upgrade libcurl to the fixed release named in the upstream advisory: unknown
- Until patched, avoid reusing or duplicating easy handles after a failed FTP wildcard LIST, and do not change only CURLOPT_WRITEDATA on such handles

## Timeline

- 2026-10-23T21:57:21+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-92388

## From the sources

When an FTP wildcard `LIST` operation fails, libcurl omits the restoration
path meant for successful listings, leaving the write callback set to the
internal listing parser and the write callback data pointing directly to the
easy handle. Subsequent reuse of this handle triggers an immediate crash, and
cloning it via `curl_easy_duphandle()` copies this corrupted state into the
duplicate. If the original handle is subsequently freed, executing a transfer
on the cloned handle causes a heap use-after-free read against the dangling
handle reference; alternatively, reusing the original or cloned handle while
changing only  `CURLOPT_WRITEDATA` (and omitting `CURLOPT_WRITEFUNCTION`)
results in type confusion, forcing the internal parser to interpret incoming
server response bytes into memory at the application-supplied write data
pointer.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
