# CVE-2026-86412: curl cookie jar data loss via server-set oversized cookie

Source: https://junglewise.ai/threats/cve-2026-86412-a-remote-http-server-can-set-a-cookie-that-curl-accepts-and  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-20. Updated: 2026-10-20  
License: CC BY 4.0 with a link back

CVE-2026-86412 · Severity: info · Published 2026-10-20

curl is a command-line tool and library for transferring data over HTTP. A remote server can set a malformed cookie that curl saves to disk but later refuses to reload due to internal size limits. When curl attempts to re-use the same cookie file, it wipes the file completely as part of its cleanup process, permanently deleting all stored cookies for unrelated websites.

Technologies: [Curl](https://junglewise.ai/threats/technologies/curl-curl). Vendors: [Curl](https://junglewise.ai/threats/vendors/curl).

## Quick answers

**Is CVE-2026-86412 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-86412 being exploited in the wild.

**How severe is CVE-2026-86412?** Informational severity, published 20 October 2026.

**Which products and versions are affected?** Curl 8.18.0 to 8.22.0; 8.20.0 to 8.20.1 in the 8.20.x branch.

**Is there a fix for CVE-2026-86412?** Yes: fixed in curl 8.20.2 (8.20.x branch), 8.23.0 (main branch). Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-86412 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-86412?** Check whether you run Curl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in curl 8.20.2 (8.20.x branch), 8.23.0 (main branch)

## Technical details

The vulnerability stems from improper error handling in curl's cookie-loading logic (CWE-754). When a single cookie entry exceeds curl's 5000-byte line limit, the entire cookie load operation is abandoned. However, the subsequent cookie write operation proceeds with only the partial set of loaded cookies, overwriting the file and erasing all cookies that were not yet reloaded. A 4094-byte cookie name plus a long Path attribute can craft a record just over the limit to trigger this condition.

## Affected products

- curl curl 8.18.0 to 8.22.0; 8.20.0 to 8.20.1 in the 8.20.x branch

## Timeline

- 2026-08-27: disclosed: Issue reported to curl project
- 2026-10-14: patched: curl 8.23.0 released with fix
- 2026-10-14: advisory: Security advisory published

## References

- [https://curl.se/docs/CVE-2026-86412.html](https://curl.se/docs/CVE-2026-86412.html)
- [https://curl.se/docs/CVE-2026-86412.json](https://curl.se/docs/CVE-2026-86412.json)

## Related threats

- [libcurl credentials leak in CURLINFO_EFFECTIVE_URL](https://junglewise.ai/threats/cve-2026-94266-libcurl-could-accidentally-return-a-url-for-curl-easy-getinfo-s)
- [curl Negotiate authentication credential exposure on redirect](https://junglewise.ai/threats/cve-2026-94265-when-processing-an-http-redirect-to-a-url-containing-userinfo-a)
- [curl stack overflow in MIME structure cleanup](https://junglewise.ai/threats/cve-2026-92391-a-deeply-nested-multipart-mime-structure-constructed-via-the)
- [curl remote-header-name file overwrite bypass](https://junglewise.ai/threats/cve-2026-92390-when-invoked-with-remote-header-name-j-curl-fails-to-preserve-its)
- [curl infinite loop via server response omission](https://junglewise.ai/threats/cve-2026-92387-by-permanently-omitting-the-final-control-response-line-a)
