7.5high
Uncontrolled Resource Consumption in parse_duration
- Severity
- 7.5high CVSS:3.1 by NVD
- Exploit likelihood
- 1.04% (higher than 64% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-qpgv-g792-wh6xCAN-2021-1000007RUSTSEC-2021-0041
Description
An issue was discovered in the parse_duration crate through 2021-03-18 for Rust. It allows attackers to cause a denial of service (CPU and memory consumption) via a duration string with a large exponent.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| parse_duration (crates.io) | up to 2.1.1, from 0.0.0-0 | GitHub Advisory Database, RustSec Advisory Database |
| parse_duration_project parse_duration | up to 2021-03-18 | NVD |
All scores
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| RustSec Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Classification
What each source says
CVE List
An issue was discovered in the parse_duration crate through 2021-03-18 for Rust. It allows attackers to cause a denial of service (CPU and memory consumption) via a duration string with a large exponent.
RustSec Advisory Database
The parse_duration::parse function allows for parsing duration strings with exponents like 5e5s where under the hood, the BigInt type along with the pow function are used for such payloads. Passing an arbitrarily big exponent makes the parse_duration::parse function to process the payload for a very long time taking up CPU and memory.
This allows an attacker to cause a DoS if the parse_duration::parse function is used to process untrusted input.
NVD (es)
Se detectó un problema en la crate parse_duration hasta el 18-03-2021 para Rust. Permite a atacantes causar una denegación de servicio (consumo de CPU y memoria) por medio de una cadena de duración con un gran exponente.
References
| https://rustsec.org/advisories/RUSTSEC-2021-0041.html | advisory, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-29932 | advisory | |
| https://github.com/zeta12ti/parse_duration/issues/21 | report, web | |
| https://github.com/zeta12ti/parse_duration | package | |
| https://crates.io/crates/parse_duration | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29932 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qpgv-g792-wh6x changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0041 changed 2023-11-08 | CC0-1.0 |
| NVD | CVE-2021-29932 changed 2026-06-17 | Public domain |