JLSEC-2026-1662: When an FTP wildcard `LIST` operation fails, libcurl omits the restoration path meant for...
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 curleasyduphandle() 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 CURLOPTWRITEDATA (and omitting CURLOPTWRITEFUNCTION) results in type confusion, forcing the internal parser to interpret incoming server response bytes into memory at the application-supplied write data pointer.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
julia/LibCURL_jllto a version that resolves this vulnerability.Fixed in 8.23.0+0
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
What application behavior is required to reach the vulnerable state?
An FTP wildcard LIST operation must fail, and the affected easy handle must then be reused or cloned. The issue is relevant to applications that perform wildcard FTP listings and retain easy handles after failed operations.
Are duplicated easy handles affected?
Yes. curl_easy_duphandle() copies the corrupted callback state into the duplicate. If the original handle is freed and a transfer is performed with the clone, the clone can read freed heap memory.
What should applications do if they cannot immediately update the affected library?
Do not reuse or duplicate an easy handle after a failed FTP wildcard LIST operation; discard it instead. When reconfiguring write handling on a reused handle, do not change CURLOPT_WRITEDATA without also setting CURLOPT_WRITEFUNCTION.