CVE-2021-45711
JSON

7.5high

Panic on incorrect date input to `simple_asn1`

Severity
7.5high CVSS:3.1 by NVD
Exploit likelihood
1.38% (higher than 72% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-3m6f-3gfg-4x56GHSA-g4h2-4wvh-grc5RUSTSEC-2021-0125

Description

An issue was discovered in the simple_asn1 crate 0.6.0 before 0.6.1 for Rust. There is a panic if UTCTime data, supplied by a remote attacker, has a second character greater than 0x7f.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
simple_asn1 (crates.io)from 0.6.0 before 0.6.1GitHub Advisory Database, RustSec Advisory Database
simple_asn1_project simple_asn10.6.0NVD

All scores

GitHubmedium rating
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

What each source says

CVE List

An issue was discovered in the simple_asn1 crate 0.6.0 before 0.6.1 for Rust. There is a panic if UTCTime data, supplied by a remote attacker, has a second character greater than 0x7f.

GitHub Advisory Database

Version 0.6.0 of the simple_asn1 crate panics on certain malformed inputs to its parsing functions, including from_der and der_decode. Because this crate is frequently used with inputs from the network, this should be considered a security vulnerability.

The issue occurs when parsing the old ASN.1 "UTCTime" time format. If an attacker provides a UTCTime where the first character is ASCII but the second character is above 0x7f, a string slice operation in the from_der_ function will try to slice into the middle of a UTF-8 character, and cause a panic.

This error was introduced in commit d7d39d709577710e9dc8, which updated simple_asn1 to use time instead of chrono because of RUSTSEC-2020-159. Versions of simple_asn1 before 0.6.0 are not affected by this issue.

The patch was applied in simple_asn1 version 0.6.1.

NVD (es)

Se ha detectado un problema en la crate simple_asn1 versiones 0.6.0 anteriores a 0.6.1 para Rust. Se presenta un pánico si los datos UTCTime, suministrados por un atacante remoto, presentan un segundo carácter mayor que 0x7f

References

Sources

SourceRecordLicence
CVE ListCVE-2021-45711 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-3m6f-3gfg-4x56 changed 2023-11-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-g4h2-4wvh-grc5 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0125 changed 2023-11-08CC0-1.0
NVDCVE-2021-45711 changed 2026-06-17Public domain