GHSA-3m6f-3gfg-4x56: Simple asn1 Panic On Incorrect Date Input Vulnerability
MODERATEGHSA-3m6f-3gfg-4x56 is a MODERATE panic on incorrect date input vulnerability (General Security Weakness) affecting Simple asn1 libraries in the crates.io ecosystem. The issue involves panic on incorrect date input to `simple_asn1`. Remediation is available by upgrading affected packages to version 0.6.1.
GHSA-3m6f-3gfg-4x56 at a Glance
How to Fix GHSA-3m6f-3gfg-4x56
To remediate this vulnerability, upgrade all affected Simple asn1 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade simple_asn1 to 0.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for simple_asn1
How to Check if You Are Affected
To determine whether your application is affected by GHSA-3m6f-3gfg-4x56, inspect your project dependencies for Simple asn1:
inspect dependencies for simple_asn1
Analyze the terminal output to locate any version of Simple asn1 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Simple asn1, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-3m6f-3gfg-4x56 Affected Simple asn1 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
simple_asn1
|
crates.io |
≥ 0.6.0
< 0.6.1
All 1 versions
0.6.0
|
0.6.1
|
References
Frequently Asked Questions
What is GHSA-3m6f-3gfg-4x56?
Which Simple asn1 versions are affected?
What version fixes GHSA-3m6f-3gfg-4x56?
Is simple_asn1 affected?
What CWE is associated with GHSA-3m6f-3gfg-4x56?
How can I check crates.io dependencies for GHSA-3m6f-3gfg-4x56?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3m6f-3gfg-4x56",
"modified" : "2022-06-17T00:19:49Z",
"published" : "2022-06-17T00:19:49Z",
"aliases" : [ ],
"summary" : "Panic on incorrect date input to `simple_asn1`",
"details" : "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.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "simple_asn1"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.6.0"
}, {
"fixed" : "0.6.1"
} ]
} ],
"versions" : [ "0.6.0" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/acw/simple_asn1/issues/27"
}, {
"type" : "WEB",
"url" : "https://github.com/acw/simple_asn1/commit/d7d39d709577710e9dc8833ee57d200eef366db8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/acw/simple_asn1"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2021-0125.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T00:19:49Z",
"nvd_published_at" : null
}
}