6.8medium
time affected by a stack exhaustion denial of service attack
- Severity
- 6.8medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.33% (higher than 28% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-r6v5-fh4h-64xcRUSTSEC-2026-0009
Description
time provides date and time handling in Rust. From 0.3.6 to before 0.3.47, 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. 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| time-rs time | >= 0.3.6, < 0.3.47 | CVE List |
| time (crates.io) | from 0.3.6 before 0.3.47 | GitHub Advisory Database, RustSec Advisory Database |
| time_project time | from 0.3.6 before 0.3.47 | NVD |
All scores
| GitHub_M | 6.8medium CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H |
| RustSec Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
time provides date and time handling in Rust. From 0.3.6 to before 0.3.47, 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. 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.
GitHub Advisory Database
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.
RustSec Advisory Database
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.
NVD (es)
time proporciona manejo de fechas y horas en Rust. Desde la versión 0.3.6 hasta antes de la 0.3.47, cuando se proporciona una entrada del usuario a cualquier tipo que analiza el formato RFC 2822, es posible un ataque de denegación de servicio por agotamiento de la pila. El ataque se basa en características formalmente deprecadas y rara vez utilizadas que forman parte del formato RFC 2822, empleadas de manera maliciosa. Una entrada ordinaria y no maliciosa nunca encontrará este escenario. Se añadió un límite a la profundidad de recursión en la versión 0.3.47. A partir de esta versión, se devolverá un error en lugar de agotar la pila.
References
| https://github.com/time-rs/time/security/advisories/GHSA-r6v5-fh4h-64xc | vendor-advisory, web | |
| https://github.com/time-rs/time/commit/1c63dc7985b8fa26bd8c689423cc56b7a03841ee | patch, web | |
| https://github.com/time-rs/time/blob/main/CHANGELOG.md#0347-2026-02-05 | release-notes, web | |
| https://github.com/time-rs/time/releases/tag/v0.3.47 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-25727 | advisory | |
| https://github.com/time-rs/time | package | |
| https://rustsec.org/advisories/RUSTSEC-2026-0009.html | advisory, web | |
| https://crates.io/crates/time | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25727 changed 2026-02-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-r6v5-fh4h-64xc changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0009 changed 2026-02-06 | CC0-1.0 |
| NVD | CVE-2026-25727 changed 2026-06-17 | Public domain |