CVE-2022-29185: Totp rs Observable Timing Discrepancy Vulnerability
MODERATECVE-2022-29185 is a MODERATE (CVSS 4.2) observable timing discrepancy vulnerability (CWE-203: Observable Discrepancy) affecting Totp rs libraries in the crates.io ecosystem. The issue involves observable timing discrepancy in totp-rs. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2022-29185 at a Glance
Security Impact
CVSS: 4.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2022-29185
To remediate this vulnerability, upgrade all affected Totp rs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade totp-rs to 1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for totp-rs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-29185, inspect your project dependencies for Totp rs:
inspect dependencies for totp-rs
Analyze the terminal output to locate any version of Totp rs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Totp rs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-29185 Affected Totp rs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
totp-rs
|
crates.io |
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2022-29185?
Which Totp rs versions are affected?
What version fixes CVE-2022-29185?
Is totp-rs affected?
What is the CVSS score of CVE-2022-29185?
What CWE is associated with CVE-2022-29185?
How can I check crates.io dependencies for CVE-2022-29185?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8vxv-2g8p-2249",
"modified" : "2022-05-24T21:33:15Z",
"published" : "2022-05-24T21:33:15Z",
"aliases" : [ "CVE-2022-29185" ],
"summary" : "Observable Timing Discrepancy in totp-rs",
"details" : "### Impact\nToken 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.\n\n### Patches\nLibrary now used constant-time comparison.\n\n### Workarounds\nNo.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [totp-rs](https://github.com/constantoine/totp-rs)\n* Email us at [cleo.rebert@gmail.com](mailto:cleo.rebert@gmail.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "totp-rs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/constantoine/totp-rs/security/advisories/GHSA-8vxv-2g8p-2249"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-29185"
}, {
"type" : "WEB",
"url" : "https://github.com/constantoine/totp-rs/issues/13"
}, {
"type" : "WEB",
"url" : "https://github.com/constantoine/totp-rs/commit/1f1e1a6fe722deb1656f483b1367ea4be978db5b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/constantoine/totp-rs"
}, {
"type" : "WEB",
"url" : "https://github.com/constantoine/totp-rs/compare/v1.0...v1.1.0"
}, {
"type" : "WEB",
"url" : "https://github.com/constantoine/totp-rs/releases/tag/v1.1.0"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0018.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-203", "CWE-208" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-05-24T21:33:15Z",
"nvd_published_at" : "2022-05-20T20:15:00Z"
}
}