Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-92386 Overview
CVE-2026-92386 affects the curl HTTP client when it writes cookies received from a remote server into a Netscape-format cookie jar. A remote HTTP server can send a cookie with a sufficiently long name and value that, once written to disk, produces a record exceeding curl's internal line-length parsing limit. Any later curl invocation that reads the same cookie jar with --cookie silently aborts parsing at the oversized line and ignores every remaining valid cookie in the file.
Critical Impact
A remote server can poison a victim's cookie jar so that subsequent curl requests silently drop legitimate session cookies, degrading authentication state and request integrity without any user-visible error.
Affected Products
- curl (command-line tool and libcurl) when writing to a Netscape-format cookie jar
- Applications and scripts that persist cookies with --cookie-jar and later re-read them with --cookie
- Downstream distributions bundling vulnerable curl versions
Discovery Timeline
- 2026-10-20 - CVE-2026-92386 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-92386
Vulnerability Analysis
The flaw lives in curl's cookie subsystem, specifically in the asymmetry between the writer and reader of Netscape-format cookie files. The writer accepts cookie name and value pairs delivered by a remote HTTP server and serializes them to a tab-separated line in the jar file. The reader enforces a maximum line length when parsing that same file.
When the writer emits a line longer than the reader will accept, the reader does not just skip that one line. It aborts the parsing loop entirely upon encountering the oversized record. Every valid cookie that appears after the oversized record is discarded, including session cookies for unrelated origins stored in the shared jar.
The net effect is a persistent, server-controlled integrity flaw against the local cookie store. See the cURL CVE-2026-92386 Advisory for the maintainer analysis.
Root Cause
The root cause is an inconsistent length contract between the Netscape cookie jar writer and reader paths. The writer imposes no cap aligned with the reader's parsing buffer, so attacker-controlled input crosses the boundary and triggers premature termination of parsing rather than per-record skipping. This is an input validation and boundary condition error in the cookie file handler.
Attack Vector
Exploitation requires a victim to use curl against a remote HTTP server controlled or influenced by the attacker, with --cookie-jar enabled to persist responses. The server returns a Set-Cookie header whose combined name and value, after serialization, produces a line exceeding curl's parse limit. On the next invocation that reads the jar with --cookie, curl aborts parsing at the oversized record. Any cookies stored below that line in the file are silently omitted from outbound requests.
The practical consequences include downgraded authentication state, loss of CSRF tokens, and inconsistent application behavior for any site whose cookies happen to be ordered after the poisoned record. Refer to the HackerOne Report #4021979 for additional context.
Detection Methods for CVE-2026-92386
Indicators of Compromise
- Netscape-format cookie jar files containing a single line significantly longer than typical cookie records, often several kilobytes.
- Repeated authentication prompts or session resets in automation that previously relied on persisted cookies.
- Outbound HTTP requests from curl-based clients missing cookies that are present in the jar on disk.
Detection Strategies
- Inspect cookie jar files written by curl and flag any line whose length exceeds the parser threshold documented in the curl advisory.
- Compare the count of cookie records written to disk against the count actually sent on subsequent requests to detect silent truncation.
- Hunt for Set-Cookie response headers containing abnormally large name or value fields from untrusted origins.
Monitoring Recommendations
- Log and alert on curl invocations that pair --cookie-jar with destinations outside an approved allow list.
- Monitor file integrity on shared cookie jars used by automation accounts and CI/CD pipelines.
- Capture HTTP response header sizes at egress proxies to identify servers returning oversized Set-Cookie values.
How to Mitigate CVE-2026-92386
Immediate Actions Required
- Upgrade curl and libcurl to the fixed version listed in the cURL CVE-2026-92386 Advisory.
- Audit existing Netscape cookie jars for oversized lines and regenerate them from trusted sessions where tampering is suspected.
- Restrict use of --cookie-jar to interactions with trusted servers until patched builds are deployed.
Patch Information
The curl project has published an advisory and machine-readable metadata for this issue. Consult the cURL CVE-2026-92386 Advisory and the cURL CVE-2026-92386 JSON Data for the exact fixed versions and commit references, then upgrade or backport accordingly across both the command-line binary and libcurl-linked applications.
Workarounds
- Avoid persisting cookies across curl invocations when communicating with untrusted servers by omitting --cookie-jar.
- Use a separate, per-origin cookie jar file so a poisoned record cannot affect unrelated sessions.
- Pre-validate cookie jar files before reuse and discard any file containing a line longer than the documented parser limit.
# Validate a Netscape cookie jar before reuse: reject files with any line > 4096 bytes
awk 'length($0) > 4096 { print "oversized line detected: " FILENAME; exit 1 }' cookies.txt \
&& curl --cookie cookies.txt https://example.test/
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

