---
id: CVE-2026-86412
title: server-set cookie erases cookie jar
summary: |-
  A remote HTTP server can set a cookie that curl accepts and writes to a
  Netscape cookie jar but cannot reload. On the next invocation using the same
  path for `--cookie` and `--cookie-jar`, curl fails before connecting, then the
  cleanup p…
severity: none
cwe:
  - CWE-754
vendor: curl
product: curl
affected:
  - curl >= 8.22.0 <= 8.22.0
  - curl >= 8.21.0 <= 8.21.0
  - curl >= 8.20.0 <= 8.20.0
  - curl >= 8.19.0 <= 8.19.0
  - curl >= 8.18.0 <= 8.18.0
published: '2026-10-20'
updated: '2026-10-20'
sourceUpdated: '2026-10-20T20:03:28.200Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-86412'
references:
  - url: 'https://curl.se/docs/CVE-2026-86412.json'
    label: json
  - url: 'https://curl.se/docs/CVE-2026-86412.html'
    label: www
  - url: 'https://hackerone.com/reports/3973201'
    label: issue
tags:
  - cve.org
ingestedAt: '2026-10-20T20:18:14.525Z'
---

## Overview

A remote HTTP server can set a cookie that curl accepts and writes to a
Netscape cookie jar but cannot reload. On the next invocation using the same
path for `--cookie` and `--cookie-jar`, curl fails before connecting, then the
cleanup procedure replaces the jar with an empty file, deleting cookies for
unrelated domains.

## Affected

- `curl >= 8.22.0 <= 8.22.0`
- `curl >= 8.21.0 <= 8.21.0`
- `curl >= 8.20.0 <= 8.20.0`
- `curl >= 8.19.0 <= 8.19.0`
- `curl >= 8.18.0 <= 8.18.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
