{"id":"CVE-2022-29185","published":"2022-05-20T19:30:12Z","modified":"2025-04-23T18:24:00Z","title":"Observable Timing Discrepancy in totp-rs","vendor":"constantoine","product":"totp-rs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.2,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00863,"percentile":0.59475,"provenance":"source"},"cwes":[{"id":"CWE-208","name":"Observable Timing Discrepancy"},{"id":"CWE-203","name":"Observable Discrepancy"}],"references":[{"url":"https://github.com/constantoine/totp-rs/security/advisories/GHSA-8vxv-2g8p-2249","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/constantoine/totp-rs/issues/13","tags":["x_refsource_MISC"]},{"url":"https://github.com/constantoine/totp-rs/releases/tag/v1.1.0","tags":["x_refsource_MISC"]}],"priority":{"score":14.8,"factors":[{"name":"EPSS percentile","points":11.89},{"name":"CVSS severity","points":2.94}]},"vendorSlug":"constantoine","affectedVersions":[{"vendor":"constantoine","product":"totp-rs","versions":["<1.1.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:07:03.554858Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"totp-rs","vulnerableRanges":["<1.1.0",">=0.0.0-0, <1.1.0"],"patched":["1.1.0"],"from":["GHSA-8vxv-2g8p-2249","RUSTSEC-2022-0018"],"provenance":"source"}],"summary":{"text":"totp-rs, a Rust library for generating time-based one-time password (TOTP) two-factor authentication tokens, contains an observable timing discrepancy because token comparison is not constant time in versions prior to 1.1.0. An attacker with network access who already knows the account password and can trigger user interaction could exploit this timing difference to guess a TOTP token value and reuse it within the same time window.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:38:09Z"},"euvd":{"id":"EUVD-2022-3248","exploited":false,"provenance":"source"}}