time vulnerable to stack exhaustion Denial of Service attackGHSA-r6v5-fh4h-64xc
Fix: time-rs/time@1c63dc7GHSA-r6v5-fh4h-64xc is a CWE-121 vulnerability in time. A fix is available for time — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-r6v5-fh4h-64xc.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
timeReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Impact
When user-provided input is provided to any type that parses with the RFC 2822 format, a denial of service attack via stack exhaustion is possible. The attack relies on formally deprecated and rarely-used features that are part of the RFC 2822 format used in a malicious manner. Ordinary, non-malicious input will never encounter this scenario.
Patches
A limit to the depth of recursion was added in v0.3.47. From this version, an error will be returned rather than exhausting the stack.
Workarounds
Limiting the length of user input is the simplest way to avoid stack exhaustion, as the amount of the stack consumed would be at most a factor of the length of the input.
Alternatively, avoiding the format altogether would also ensure that the vulnerability is not encountered. To do this, add
disallowed-types = ["time::format_description::well_known::Rfc2822"]
to your clippy.toml file. This will trigger the clippy::disallowed_types lint, which is warn-by-default and can be explicitly denied.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | time | ≥ 0.3.6&&< 0.3.47 | 0.3.47cargo update -p time --precise 0.3.47 |
Affected Products
timetime_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for time, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update time to 0.3.47 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r6v5-fh4h-64xc is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-r6v5-fh4h-64xc (CC BY 4.0)
Frequently Asked Questions
Is GHSA-r6v5-fh4h-64xc in your dependencies?
Find it across crates.io, including transitive dependencies.