GHSA-773q-5334-5gf9: Evm core Memory Over-allocation Vulnerability

MODERATE
CWE-789
Published
Advisory Summary

GHSA-773q-5334-5gf9 is a MODERATE memory over-allocation vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting Evm core libraries in the crates.io ecosystem. The issue involves memory over-allocation in evm-core. Remediation is available by upgrading affected packages to version 0.26.1, 0.25.1, 0.24.1, 0.23.1, 0.21.1.

GHSA-773q-5334-5gf9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-773q-5334-5gf9
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product Evm core
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-773q-5334-5gf9

To remediate this vulnerability, upgrade all affected Evm core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

evm-core fixed: 0.26.1
Upgrade evm-core to 0.26.1
evm-core fixed: 0.25.1
Upgrade evm-core to 0.25.1
evm-core fixed: 0.24.1
Upgrade evm-core to 0.24.1
evm-core fixed: 0.23.1
Upgrade evm-core to 0.23.1
evm-core fixed: 0.21.1
Upgrade evm-core to 0.21.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for evm-core

How to Check if You Are Affected

To determine whether your application is affected by GHSA-773q-5334-5gf9, inspect your project dependencies for Evm core:

inspect dependencies for evm-core

Analyze the terminal output to locate any version of Evm core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.26.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 CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In Evm core, 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

Prior to the patch, when executing specific EVM opcodes related to memory operations that use `evm_core::Memory::copy_large`, the crate can over-allocate memory when it is not needed, making it possible for an attacker to perform denial-of-service attack. The flaw was corrected in commit `19ade85`.

GHSA-773q-5334-5gf9 Affected Evm core Versions

5 component(s)
Fixed Versions:
0.26.10.25.10.24.10.23.10.21.1
Product / Package Ecosystem Affected Versions Fixed Version
evm-core
crates.io
≥ 0.26.0
< 0.26.1
0.26.1
evm-core
crates.io
≥ 0.25.0
< 0.25.1
0.25.1
evm-core
crates.io
≥ 0.24.0
< 0.24.1
0.24.1
evm-core
crates.io
≥ 0.23.0
< 0.23.1
0.23.1
evm-core
crates.io
< 0.21.1
0.21.1

References

Frequently Asked Questions

What is GHSA-773q-5334-5gf9?
GHSA-773q-5334-5gf9 is a security vulnerability in Evm core involving Memory over-allocation in evm-core under CWE-789: Memory Allocation with Excessive Size Value.
Which Evm core versions are affected?
Affected versions include releases prior to 0.26.1, 0.25.1, 0.24.1, 0.23.1, 0.21.1 across affected packages: evm-core.
What version fixes GHSA-773q-5334-5gf9?
Upgrading to 0.26.1, 0.25.1, 0.24.1, 0.23.1, 0.21.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is evm-core affected?
Yes, evm-core is affected in releases prior to 0.26.1, 0.25.1, 0.24.1, 0.23.1, 0.21.1. Upgrade your dependency to 0.26.1, 0.25.1, 0.24.1, 0.23.1, 0.21.1 or later.
What CWE is associated with GHSA-773q-5334-5gf9?
GHSA-773q-5334-5gf9 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check crates.io dependencies for GHSA-773q-5334-5gf9?
Run the dependency tree command: 'inspect dependencies for evm-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-773q-5334-5gf9",
  "modified" : "2021-08-18T21:38:27Z",
  "published" : "2021-08-25T20:55:36Z",
  "aliases" : [ ],
  "summary" : "Memory over-allocation in evm-core",
  "details" : "Prior to the patch, when executing specific EVM opcodes related\nto memory operations that use `evm_core::Memory::copy_large`, the\ncrate can over-allocate memory when it is not needed, making it\npossible for an attacker to perform denial-of-service attack.\n\nThe flaw was corrected in commit `19ade85`.\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "evm-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.26.0"
      }, {
        "fixed" : "0.26.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "evm-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.25.0"
      }, {
        "fixed" : "0.25.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "evm-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.24.0"
      }, {
        "fixed" : "0.24.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "evm-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.23.0"
      }, {
        "fixed" : "0.23.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "evm-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.21.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rust-blockchain/evm/commit/19ade85"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rust-blockchain/evm"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2021-0066.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-08-18T21:38:27Z",
    "nvd_published_at" : null
  }
}