{"id":"CVE-2021-45711","aliases":["CVE-2021-45711","GHSA-3m6f-3gfg-4x56","GHSA-g4h2-4wvh-grc5","RUSTSEC-2021-0125"],"related":[],"kind":"vulnerability","state":"published","title":"Panic on incorrect date input to `simple_asn1`","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Version 0.6.0 of the `simple_asn1` crate panics on certain malformed\ninputs to its parsing functions, including `from_der` and `der_decode`.\nBecause this crate is frequently used with inputs from the network, this\nshould be considered a security vulnerability.\n\nThe issue occurs when parsing the old ASN.1 \"UTCTime\" time format.  If an\nattacker provides a UTCTime where the first character is ASCII but the\nsecond character is above 0x7f, a string slice operation in the\n`from_der_` function will try to slice into the middle of a UTF-8\ncharacter, and cause a panic.\n\nThis error was introduced in commit\n[`d7d39d709577710e9dc8`](https://github.com/acw/simple_asn1/commit/d7d39d709577710e9dc8833ee57d200eef366db8),\nwhich updated `simple_asn1` to use `time` instead of `chrono` because of\n[`RUSTSEC-2020-159`](https://rustsec.org/advisories/RUSTSEC-2020-0159).\nVersions of `simple_asn1` before 0.6.0 are not affected by this issue.\n\nThe [patch](https://github.com/acw/simple_asn1/pull/28) was applied in\n`simple_asn1` version 0.6.1.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-11-14T12:00:00.000Z","modified":"2026-06-17T04:13:59.860Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-20","CWE-400"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.6.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"simple_asn1","purl":"pkg:cargo/simple_asn1","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.6.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"simple_asn1","purl":"pkg:cargo/simple_asn1","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.6.0","status":"affected","fixed":"0.6.1"}],"ecosystem":"crates.io","package":"simple_asn1","purl":"pkg:cargo/simple_asn1","source":"rustsec"},{"ranges":[{"status":"affected","version":"0.6.0"}],"vendor":"simple_asn1_project","product":"simple_asn1","cpe":"cpe:2.3:a:simple_asn1_project:simple_asn1:0.6.0:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0125.html","tags":["advisory","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/simple_asn1/RUSTSEC-2021-0125.md","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/acw/simple_asn1/issues/27","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/acw/simple_asn1/commit/d7d39d709577710e9dc8833ee57d200eef366db8","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/acw/simple_asn1","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45711","tags":["advisory"],"sources":["ghsa"]},{"url":"https://crates.io/crates/simple_asn1","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-45711","url":"https://www.cve.org/CVERecord?id=CVE-2021-45711","licence":"CVE Terms of Use","modified":"2024-08-04T04:47:02.113Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3m6f-3gfg-4x56","url":"https://github.com/advisories/GHSA-3m6f-3gfg-4x56","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:23.302Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g4h2-4wvh-grc5","url":"https://github.com/advisories/GHSA-g4h2-4wvh-grc5","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:23.302Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0125","url":"https://rustsec.org/advisories/RUSTSEC-2021-0125.html","licence":"CC0-1.0","modified":"2023-11-08T04:07:23.302Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-45711","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45711","licence":"Public domain","modified":"2026-06-17T04:13:59.860Z"}],"updatedAt":"2026-11-25T22:58:06.272Z","epss":{"score":0.01384,"percentile":0.72996,"date":"2026-12-01T12:00:22.000Z"}}