CVE-2022-29185
MEDIUM 4.4CVSS 3.1Observable Timing Discrepancy in totp-rs
totp-rs is a Rust library that permits the creation of 2FA authentification tokens per time-based one-time password (TOTP). Prior to version 1.1.0, token comparison was not constant time, and could theorically be used to guess value of an TOTP token, and thus reuse it in the same time window. The attacker would have to know the password beforehand nonetheless. Starting with patched version 1.1.0, the library uses constant-time comparison. There are currently no known workarounds.
- Published
- 20 May 2022
- Last modified
- 12 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-203CWE-208
- Also known as
- GHSA-8vxv-2g8p-2249RUSTSEC-2022-0018
- Sources
- NVDJSONOSV GHSA-8vxv-2g8p-2249JSONOSV RUSTSEC-2022-0018JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 4.4 | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N |
| OSV | RustSec | CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 3.5 | AV:N/AC:M/Au:S/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | totp-rs_project | totp-rscpe:2.3:a:totp-rs_project:totp-rs:*:*:*:*:*:rust:*:* |
< 1.1.0 | 1.1.0 |
| OSV | crates.io | totp-rs | < 1.1.0 | 1.1.0 |
| OSV | crates.io | totp-rs | >= 0.0.0-0, < 1.1.0 | 1.1.0 |
References
- https://github.com/constantoine/totp-rs/issues/13 · Issue Tracking, Third Party Advisory, WEB, REPORT
- https://github.com/constantoine/totp-rs/releases/tag/v1.1.0 · Release Notes, Third Party Advisory, WEB
- https://github.com/constantoine/totp-rs/security/advisories/GHSA-8vxv-2g8p-2249 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-29185 · ADVISORY
- https://github.com/constantoine/totp-rs/commit/1f1e1a6fe722deb1656f483b1367ea4be978db5b · WEB
- https://github.com/constantoine/totp-rs · PACKAGE
- https://github.com/constantoine/totp-rs/compare/v1.0...v1.1.0 · WEB
- https://rustsec.org/advisories/RUSTSEC-2022-0018.html · WEB, ADVISORY
- https://crates.io/crates/totp-rs · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 20 May 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 9 May 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 May 2022)