cookie: Private cookie nonces can repeat in processes that fork
- CVE-2026-140014
- GHSA-8wcq-xq25-7fhm
- RUSTSEC-2026-0594
- EUVD-2026-139740
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.
Text from the CVE.org record.
Recommendation
cookie
- If you run a version from 0.14.0 to before 0.18.3update to 0.18.3 or laterMajor version change: expect breaking changescookie 0.18.3 on its registry (opens in a new tab)
- If you run a version from 0.11.3 to before 0.12.0update to 0.12.0 or laterMajor version change: expect breaking changescookie 0.12.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
rwf2 cookie-rs
Affected versions Fixed in >= 0.14.0, < 0.18.3 none stated >= 0.11.3, < 0.12.0 none stated cookiecrates.io
Affected versions Fixed in from 0.14.0 to before 0.18.3 0.18.3 from 0.11.3 to before 0.12.0 0.12.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.