Email me

Rust advisories / parse_duration

Vulnerability HighRUSTSEC-2021-0041 · parse_duration

RUSTSEC-2021-0041: Denial of service through parsing payloads with too big exponent

Short answerA security vulnerability in the parse_duration crate: Denial of service through parsing payloads with too big exponent. High severity (CVSS 7.5). No fixed version: replace the crate or remove the affected code path.

Crateparse_duration
TypeVulnerability (denial-of-service)
Affected versionsEvery version.
Fixed innone
SeverityHigh, CVSS 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published2021-03-18
Last changed2023-11-08
Also known asCAN-2021-1000007, CVE-2021-29932, GHSA-qpgv-g792-wh6x
Affected functionsparse_duration::parse

What to do

  1. Find who pulls it in: cargo tree -i parse_duration.
  2. Avoid the affected API (parse_duration::parse), or replace the crate.

Details from the advisory

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.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ