Skip to content

Commit c5d3ba4

Browse files
jhprattdjc
authored andcommitted
Add advisory for time
1 parent e4c446c commit c5d3ba4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

crates/time/RUSTSEC-0000-0000.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "time"
5+
date = "2026-02-05"
6+
url = "https://github.com/time-rs/time/blob/main/CHANGELOG.md#0347-2026-02-05"
7+
categories = ["denial-of-service"]
8+
cvss = "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"
9+
keywords = ["stack", "exhaustion"]
10+
aliases = ["CVE-2026-25727", "GHSA-r6v5-fh4h-64xc"]
11+
12+
[affected.functions]
13+
# for all methods: only when `time::format_description::well_known::Rfc2822` is used as the format
14+
"time::parsing::Parsed::parse_item" = [">= 0.3.6, < 0.3.47"]
15+
"time::Date::parse" = [">= 0.3.6, < 0.3.47"]
16+
"time::Time::parse" = [">= 0.3.6, < 0.3.47"]
17+
"time::UtcOffset::parse" = [">= 0.3.6, < 0.3.47"]
18+
"time::PrimitiveDateTime::parse" = [">= 0.3.6, < 0.3.47"]
19+
"time::OffsetDateTime::parse" = [">= 0.3.6, < 0.3.47"]
20+
"time::UtcDateTime::parse" = [">= 0.3.38, < 0.3.47"] # type not present until 0.3.38
21+
22+
[versions]
23+
patched = [">= 0.3.47"]
24+
unaffected = ["< 0.3.6"]
25+
```
26+
27+
# Impact
28+
29+
When user-provided input is provided to any type that parses with the RFC 2822 format, a denial of
30+
service attack via stack exhaustion is possible. The attack relies on formally deprecated and
31+
rarely-used features that are part of the RFC 2822 format used in a malicious manner. Ordinary,
32+
non-malicious input will never encounter this scenario.
33+
34+
# Patches
35+
36+
A limit to the depth of recursion was added in v0.3.47. From this version, an error will be returned
37+
rather than exhausting the stack.
38+
39+
# Workarounds
40+
41+
Limiting the length of user input is the simplest way to avoid stack exhaustion, as the amount of
42+
the stack consumed would be at most a factor of the length of the input.

0 commit comments

Comments
 (0)