
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-140014 is a nonce-reuse vulnerability in the cookie-rs Rust library (crate: cookie) that allows AES-256-GCM encryption to be bypassed when a Unix-like process forks without calling exec(). Affected versions are >= 0.11.3, < 0.12.0 and >= 0.14.0, < 0.18.3; the issue was disclosed on November 23, 2026, and fixed in version 0.18.3. It carries a CVSS v3.1 base score of 6.5 (Medium) (GitHub Advisory).
The root cause is classified as CWE-323 (Reusing a Nonce, Key Pair in Encryption). PrivateJar generated 96-bit AES-256-GCM nonces using rand::thread_rng(), a thread-local PRNG that buffers its state. When a Unix process calls fork() without exec(), both the parent and child inherit identical buffered RNG state on the forking thread, causing them to produce the same sequence of nonces for subsequent private cookie encryption operations. At most the first 21 private cookies added on that thread in each resulting process (or up to ~5,400 with rand 0.10 per the fix commit notes) can share nonces before the generator reseeds. The fix replaces rand::thread_rng() with the OS-level RNG (OsRng / SysRng), which is not affected by fork (GitHub Advisory, Fix Commit).
An attacker who obtains two private cookies from different forked processes that share a nonce can recover the XOR of the two plaintexts — and thus either plaintext if the other is known — and also recover the GHASH authentication key, enabling them to forge arbitrary private cookies that the application accepts as authentic. This results in a high integrity impact (cookie forgery enabling session hijacking or privilege escalation) and a low confidentiality impact (partial plaintext recovery). Availability is not affected, and the vulnerability is limited to Unix-like systems running applications that fork worker processes and handle cookies on the forking thread (GitHub Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been reported. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires a narrow set of conditions: a Unix-like deployment that forks worker processes, uses the same Key across processes, and handles private cookies on the forking thread — a configuration explicitly noted as uncommon for Rust web frameworks such as Rocket and axum (GitHub Advisory, Feedly).
cookie-rs versions >= 0.11.3, < 0.12.0 or >= 0.14.0, < 0.18.3, runs on a Unix-like OS, forks worker processes without exec(), and handles private cookies on the forking thread with a shared Key.Upgrade cookie-rs to version 0.18.3, which generates nonces using the OS-level RNG (OsRng/SysRng) instead of the thread-local PRNG, eliminating the fork-related nonce reuse. If upgrading immediately is not possible, any one of the following workarounds prevents the issue: (1) avoid using rand::thread_rng() on the forking thread before forking — use Key::from() or Key::derive_from() instead of Key::generate(); (2) in each child process immediately after forking, read and discard at least 256 bytes from rand::thread_rng() before adding any private cookie; or (3) add private cookies only on threads created after the fork. Applications that ran in an affected configuration should also rotate their encryption Key (GitHub Advisory, Release 0.18.3).
The advisory was authored and published by Sergio Benitez, the maintainer of cookie-rs, who provided detailed analysis of affected frameworks including Rocket and axum, confirming that both are not affected under normal deployment configurations. The advisory explicitly notes that this is an uncommon deployment pattern for Rust web applications, limiting the practical impact (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."