CVE-2022-29185 Observable Timing Discrepancy in totp-rs

Medium 4.2 Published Updated

An attacker with prior knowledge of the password could potentially guess TOTP tokens via timing side-channels in the totp-rs library.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-29185?

CVE-2022-29185 is a medium-severity vulnerability in constantoine totp-rs, published on 20 May 2022. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-208, CWE-203

Which versions are affected by CVE-2022-29185?

3 open source packages ship an affected version, including totp-rs. It affects 1 product.

PackageAffectedFixed in
totp-rs crates.ioAll versions1.1.0
totp-rs crates.ioAll versions1.1.0
totp-rs crates.ioFrom 0.0.0-01.1.0

Products include Totp-Rs Project Totp-Rs.

How do I fix CVE-2022-29185?

Upgrade totp-rs to 1.1.0 or later.

Is CVE-2022-29185 being exploited?

There is no known exploitation of CVE-2022-29185 in the wild and no public exploit code.

Sources

Also known as GHSA-8vxv-2g8p-2249, RUSTSEC-2022-0018.

Is CVE-2022-29185 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free