Skip to main content
VulnerabilityPublished

Private Cookie Nonces Can Repeat

Affects cookieSource GCVE Database

0

CVSS 6.5 Medium : upgrade to 0.18.3 or 0.12.0 when convenient.

Data as of 23 Nov 2026, 10:11 UTC

CVSS 3.1 base score
6.5Medium
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.18.3, 0.12.0
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N

What to do

Upgrade cookie to 0.18.3 or 0.12.0.

Affected software

ProductAffectedFixed in
crates.iocookiepkg:cargo/cookieOther threatsAffected
  • >=0.11.3 <0.12.0
  • >=0.14.0 <0.18.3
Fixed in
  • 0.12.0
  • 0.18.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A fix is available in cookie crate version 0.18.3, which obtains nonces from the operating system's random number generator, preventing nonce reuse after fork. Users should upgrade to version 0.18.3 or later. If upgrading is not possible, workarounds include avoiding the use of rand::thread_rng() before forking or avoiding adding private cookies on the forking thread in multiple processes. Applications that do not fork or use signed cookies are not affected and require no action.

Description

This vulnerability affects Rust applications that use the cookie crate to add private (encrypted) cookies on a thread that forks into multiple processes without an exec. The nonce used for AES-256-GCM encryption of private cookies can be reused in the parent and child processes, breaking the security guarantees of AES-GCM. This nonce reuse allows an attacker to recover plaintext relationships and forge private cookies. The issue only affects Unix-like systems with fork without exec, and only the first 21 private cookies added after the fork on the same thread share nonces. Applications that do not fork, use signed cookies, or use versions 0.12.0 and later of the cookie crate are not affected. Rocket and axum frameworks are generally not affected unless axum is used with a specific forking and runtime configuration. The vulnerability is fixed in cookie crate version 0.18.3.

References

Community reviews

Loading reviews…