Skip to content- Sources: primary
- Summary: The cookie crate drew private cookie nonces from rand::thread_rng(), whose buffered bytes survive fork(), so the first private cookies sealed after a fork in parent and children can share nonces, which lets an attacker recover plaintext XORs and the GHASH key to forge cookies. Only processes that fork without exec and add private cookies on the forking thread are affected, which excludes axum on a normal multi-threaded runtime and Rocket. Version 0.18.3 takes nonces from the OS random generator, and affected deployments should rotate their Key.
- Why it matters: axum-extra PrivateCookieJar users who fork workers onto current-thread runtimes should upgrade cookie and rotate keys, and everyone else should still bump the lockfile.
- Background: AES-GCM is safe only while each nonce is used once per key. A repeated nonce exposes the XOR of two plaintexts and lets an attacker derive the authentication key used to forge tags. User-space random generators that buffer output are a known hazard across fork(), since both processes continue from the same buffered state.