CVE-2026-25727
JSON

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 packageVersionsReported by
time-rs time>= 0.3.6, < 0.3.47CVE List
time (crates.io)from 0.3.6 before 0.3.47GitHub Advisory Database, RustSec Advisory Database
time_project timefrom 0.3.6 before 0.3.47NVD

All scores

GitHub_M6.8medium CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
GitHubmedium CVSS:4.0CVSS: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 DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:H/AT:N/PR:L/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Classification

CWE-121

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

Sources

SourceRecordLicence
CVE ListCVE-2026-25727 changed 2026-02-06CVE Terms of Use
GitHub Advisory DatabaseGHSA-r6v5-fh4h-64xc changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2026-0009 changed 2026-02-06CC0-1.0
NVDCVE-2026-25727 changed 2026-06-17Public domain