- Reported
-
- Issued
-
- Package
-
time
(crates.io)
- Type
-
Vulnerability
- Categories
-
- Keywords
-
#stack
#exhaustion
- Aliases
-
- References
-
- CVSS Score
- 6.8
MEDIUM
- CVSS Details
-
- Attack Complexity
- High
- Attack Requirements
- None
- Attack Vector
- Network
- Privileges Required
- Low
- Availability Impact to the Subsequent System
- High
- Confidentiality Impact to the Subsequent System
- None
- Integrity Impact to the Subsequent System
- None
- User Interaction
- Active
- Availability Impact to the Vulnerable System
- High
- Confidentiality Impact to the Vulnerable System
- None
- Integrity Impact to the Vulnerable System
- None
- CVSS Vector
- 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
- Patched
-
- Unaffected
-
- Affected Functions
- Version
time::Date::parse
-
time::OffsetDateTime::parse
-
time::PrimitiveDateTime::parse
-
time::Time::parse
-
time::UtcDateTime::parse
-
time::UtcOffset::parse
-
time::parsing::Parsed::parse_item
-
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.
Advisory available under CC0-1.0
license.