CVE-2021-41153: Evm Specification Non-compliance Vulnerability
HIGHCVE-2021-41153 is a HIGH (CVSS 8.7) specification non-compliance vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting Evm libraries in the crates.io ecosystem. The issue involves specification non-compliance in jumpi. Remediation is available by upgrading affected packages to version 0.31.0.
CVE-2021-41153 at a Glance
Security Impact
CVSS: 8.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N).
How to Fix CVE-2021-41153
To remediate this vulnerability, upgrade all affected Evm 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 evm to 0.31.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for evm
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-41153, inspect your project dependencies for Evm:
inspect dependencies for evm
Analyze the terminal output to locate any version of Evm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.31.0), 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 CWE-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. In Evm, 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
CVE-2021-41153 Affected Evm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
evm
|
crates.io |
< 0.31.0
|
0.31.0
|
References
Frequently Asked Questions
What is CVE-2021-41153?
Which Evm versions are affected?
What version fixes CVE-2021-41153?
Is evm affected?
What is the CVSS score of CVE-2021-41153?
What CWE is associated with CVE-2021-41153?
How can I check crates.io dependencies for CVE-2021-41153?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pvh2-pj76-4m96",
"modified" : "2021-10-25T20:07:57Z",
"published" : "2021-10-19T15:28:35Z",
"aliases" : [ "CVE-2021-41153" ],
"summary" : "Specification non-compliance in JUMPI",
"details" : "### Impact \n\nIn `evm` crate `< 0.31.0`, `JUMPI` opcode's condition is checked after the destination validity check. However, according to Geth and OpenEthereum, the condition check should happen before the destination validity check.\n\n### Patches\n\nThis is a **high** severity security advisory if you use `evm` crate for Ethereum mainnet. In this case, you should update your library dependency immediately to on or after `0.31.0`.\n\nThis is a **low** severity security advisory if you use `evm` crate in Frontier or in a standalone blockchain, because there's no security exploit possible with this advisory. It is **not** recommended to update to on or after `0.31.0` until all the normal chain upgrade preparations have been done. If you use Frontier or other `pallet-evm` based Substrate blockchain, please ensure to update your `spec_version` before updating this. For other blockchains, please make sure to follow a hard-fork process before you update this.\n\n### Workarounds\n\nIf you are dependent on an older version of `evm` and cannot update due to API interface changes, please contact Wei by email (wei@that.world), who will be happy to help you to publish patch releases for older `evm` versions.\n\n### References\n\nFix PR: https://github.com/rust-blockchain/evm/pull/67\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in the `evm` repo.\n\n### Special thanks\n\nSpecial thanks to @rakita for reporting this issue.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "evm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.31.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-blockchain/evm/security/advisories/GHSA-pvh2-pj76-4m96"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41153"
}, {
"type" : "WEB",
"url" : "https://github.com/rust-blockchain/evm/pull/67"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-blockchain/evm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-670" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-18T21:06:02Z",
"nvd_published_at" : "2021-10-18T21:15:00Z"
}
}