# CVE-2026-140014: cookie: Private cookie nonces can repeat in processes that fork

- **Severity:** MEDIUM 6.5
- **CVSS:** 6.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: High; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.43% (percentile 40, 2026-12-03)
- **CWE:** CWE-323
- **Aliases:** GHSA-8wcq-xq25-7fhm, RUSTSEC-2026-0594
- **Published:** 2026-11-23T12:00:00.000Z
- **Modified:** 2026-12-04T15:47:41.367Z

## Who should check

- Projects that depend on crates.io package cookie (\>= 0.14.0, \< 0.18.3)
- Anyone running rwf2 cookie-rs \>= 0.14.0, \< 0.18.3; \>= 0.11.3, \< 0.12.0

## Description

cookie is an HTTP cookie parsing and cookie jar management library for Rust. From 0.11.3 until 0.12.0 and from 0.14.0 until 0.18.3, PrivateJar generates AES-256-GCM nonces with rand::thread\_rng(), whose buffered state can be duplicated when a Unix-like process calls fork() without exec(). The forking thread must have used the thread-local generator before the fork, and two resulting processes must add private cookies on that same thread with a shared Key; applications that do not fork, create cookies only on post-fork threads, use SignedJar, or run on Windows are not affected. At most the first 21 private cookies added on that thread in each resulting process can reuse nonces before the generator reseeds and the processes diverge. An attacker must obtain two cookies from different resulting processes that share a nonce to recover plaintext relationships and forge private cookies accepted by the application. This issue is fixed in version 0.18.3.

## Affected and fixed versions

- crates.io `cookie`: affected \>= 0.14.0, \< 0.18.3; fixed 0.18.3, 0.12.0 (ghsa)
- rwf2 cookie-rs: \>= 0.14.0, \< 0.18.3; \>= 0.11.3, \< 0.12.0 (cvelist)

## Technologies

Rust (AI-matched), Rust crates

## Mitigation

- Upgrade cookie to one of 0.18.3, 0.12.0 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-140014. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-140014.md
Affected: cookie >= 0.14.0, < 0.18.3
Fixed in: 0.18.3, 0.12.0

Steps:
1. Search this machine and project for cookie (crates.io), rwf2 cookie-rs: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-140014 being exploited?

There is no confirmed exploitation: CVE-2026-140014 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.43% chance of exploitation in the next 30 days (as of 2026-12-03).

### How serious is CVE-2026-140014?

Medium: CVSS 6.5 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-140014?

cookie \>= 0.14.0, \< 0.18.3.

### Is there a fix for CVE-2026-140014?

Yes. Fixed in 0.18.3, 0.12.0. Upgrade cookie to one of 0.18.3, 0.12.0 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-140014?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/rwf2/cookie-rs/security/advisories/GHSA-8wcq-xq25-7fhm>
- vendor: <https://rustsec.org/advisories/RUSTSEC-2026-0594.html>
- patch: <https://github.com/rwf2/cookie-rs/commit/4a5e0f31fa18731cb8270090f1d173679bca913c>
- patch: <https://github.com/rwf2/cookie-rs/commit/98de6032defb10ad5e49d83fa1a9bbed1873cbe4>
- other: <https://github.com/rwf2/cookie-rs/releases/tag/0.18.3>
- other: <https://nvd.nist.gov/vuln/detail/CVE-2026-140014>
- other: <https://github.com/advisories/GHSA-8wcq-xq25-7fhm>
- other: <https://crates.io/crates/cookie>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-140014>
- GitHub Advisory Database: CC-BY 4.0 <https://github.com/advisories/GHSA-8wcq-xq25-7fhm> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/RUSTSEC-2026-0594> (license: <https://creativecommons.org/licenses/by/4.0/>)
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-140014> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-140014>
