{"id":"CVE-2021-29932","aliases":["CAN-2021-1000007","EUVD-2021-1847","GHSA-qpgv-g792-wh6x","RUSTSEC-2021-0041"],"status":"published","title":"Uncontrolled Resource Consumption in parse_duration","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.01036,"percentile":0.64172,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-400","CWE-770"],"published":"2021-03-18T12:00:00Z","modified":"2026-06-17T03:48:27Z","affected":[{"source":"ghsa","ecosystem":"crates.io","package":"parse_duration","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.1.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"parse_duration","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"2.1.1"}]}]},{"source":"osv","ecosystem":"crates.io","package":"parse_duration","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"products":[{"vendor":"parse_duration_project","product":"parse_duration"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0041.html","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29932","tags":["advisory"]},{"url":"https://github.com/zeta12ti/parse_duration/issues/21","tags":["web","report"]},{"url":"https://github.com/advisories/GHSA-qpgv-g792-wh6x"},{"url":"https://github.com/zeta12ti/parse_duration","tags":["package"]},{"url":"https://crates.io/crates/parse_duration","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-29932","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.","status":"published","published":"2021-04-01T04:24:37Z","modified":"2024-08-03T22:18:03.277Z","updated_at":"2026-11-02T14:33:06.32268Z"}],"euvd":[{"id":"EUVD-2021-1847","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.","status":"published","published":"2021-04-01T04:24:37Z","modified":"2024-08-03T22:18:03Z","updated_at":"2026-11-03T03:24:43.413555Z"}],"ghsa":[{"id":"GHSA-qpgv-g792-wh6x","title":"Uncontrolled Resource Consumption in parse_duration","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.","status":"published","published":"2021-08-25T20:54:04Z","modified":"2023-02-01T05:05:56Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T14:36:36.66596Z"}],"nvd":[{"id":"CVE-2021-29932","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.","status":"published","published":"2021-04-01T05:15:14.42Z","modified":"2026-06-17T03:48:27.8Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-770"],"updated_at":"2026-11-02T14:06:51.197859Z"}],"osv":[{"id":"GHSA-qpgv-g792-wh6x","title":"Uncontrolled Resource Consumption in parse_duration","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.","status":"published","published":"2021-08-25T20:54:04Z","modified":"2023-11-08T03:56:44.037848Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-400"],"updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"RUSTSEC-2021-0041","title":"Denial of service through parsing payloads with too big exponent","description":"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](https://github.com/zeta12ti/parse_duration/blob/26940ab5cd4e3a9d6bd97aa101f8d4bbfd18ee8c/src/parse.rs#L335). 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.\n\nThis allows an attacker to cause a DoS if the `parse_duration::parse` function is used to process untrusted input.","status":"published","published":"2021-03-18T12:00:00Z","modified":"2023-11-08T03:56:44.037848Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
