-
CVSS Score
-The vulnerability stemmed from using regular string comparison (==) in the token validation logic. The commit diff shows the critical fix replaced this with constant_time_eq() in TOTP<T>::check. This function's comparison of generated tokens with user input was vulnerable to timing analysis, as string equality checks in most languages (including Rust) short-circuit on first mismatch. The direct replacement with a constant-time comparison function in the patched version confirms this was the vulnerable point.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| totp-rs | rust | < 1.1.0 | 1.1.0 |