CVE-2022-29185Totp-rs Project Totp-rs
Medium 4.4
Follow: this CVE · Totp-rs Project · Totp-rs Project Totp-rs We alert you by email or Slack (account required).
- Priority
- 26
- CVSS 3.1
- 4.4
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 57
- Auth required
- Yes
- Published
- May 20, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Totp-rs.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| crates.io | totp-rs |
< 1.1.0 |
1.1.0 |
cargo update -p totp-rs --precise 1.1.0 |
| crates.io | totp-rs |
≥ 0.0.0-0 < 1.1.0 |
1.1.0 |
cargo update -p totp-rs --precise 1.1.0 |
Per OSV / GitHub Advisories (GHSA-8vxv-2g8p-2249, RUSTSEC-2022-0018). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| totp-rs_project | totp-rs | < 1.1.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Issue Tracking Third Party Advisory
- github.com Release Notes Third Party Advisory
- github.com Third Party Advisory