6.5medium
Memory over-allocation in evm crate
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.42% (higher than 73% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4jwq-572w-4388
Description
evm is a pure Rust implementation of Ethereum Virtual Machine. Prior to the patch, when executing specific EVM opcodes related to memory operations that use `evm_core::Memory::copy_large`, the `evm` 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`. Users should upgrade to `==0.21.1, ==0.23.1, ==0.24.1, ==0.25.1, >=0.26.1`. There are no workarounds. Please upgrade your `evm` crate version.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rust-blockchain evm | < 0.21.1, = 0.22.0, = 0.23.0, = 0.24.0, = 0.25.0 | CVE List |
| evm (crates.io) | before 0.21.1, from 0.22.0 before 0.22.1, from 0.23.0 before 0.23.1, from 0.24.0 before 0.24.1, from 0.25.0 before 0.25.1, from 0.26.0 before 0.26.1 | GitHub Advisory Database |
| evm-core (crates.io) | before 0.21.1, from 0.22.0 before 0.22.1, from 0.23.0 before 0.23.1, from 0.24.0 before 0.24.1, from 0.25.0 before 0.25.1, from 0.26.0 before 0.26.1 | GitHub Advisory Database |
| evm_project evm | up to 0.21.0, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.26.0 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:N/I:N/A:P |
Classification
What each source says
CVE List
evm is a pure Rust implementation of Ethereum Virtual Machine. Prior to the patch, when executing specific EVM opcodes related to memory operations that use `evm_core::Memory::copy_large`, the `evm` 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`. Users should upgrade to `==0.21.1, ==0.23.1, ==0.24.1, ==0.25.1, >=0.26.1`. There are no workarounds. Please upgrade your `evm` crate version.
GitHub Advisory Database
Impact
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.
Patches
The flaw was corrected in commit 19ade85. Users should upgrade to ==0.21.1, ==0.23.1, ==0.24.1, ==0.25.1, >=0.26.1.
Workarounds
None. Please upgrade your evm crate version
References
Fix commit: https://github.com/rust-blockchain/evm/commit/19ade858c430ab13eb562764a870ac9f8506f8dd
For more information
If you have any questions or comments about this advisory:
NVD (es)
evm es una implementación pura de Rust de Ethereum Virtual Machine. Anterior al parche, cuando se ejecutan códigos de operación EVM específicos relacionados con operaciones de memoria que usan la función "evm_core::Memory::copy_large", la crate "evm" puede sobreasignar memoria cuando no es necesaria, haciendo posible a un atacante llevar a cabo un ataque de denegación de servicio. El fallo fue corregido en el commit "19ade85". Los usuarios deberían actualizar a "==0.21.1, ==0.23.1, ==0.24.1, ==0.25.1, )=0.26.1". No existen soluciones alternativas. Por favor Actualice su versión de crate "evm"
References
| https://github.com/rust-blockchain/evm/security/advisories/GHSA-4jwq-572w-4388 | patch, third-party-advisory, web | |
| https://github.com/rust-blockchain/evm/commit/19ade858c430ab13eb562764a870ac9f8506f8dd | patch, third-party-advisory, web | |
| https://crates.io/crates/evm | third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-29511 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-29511 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4jwq-572w-4388 changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-29511 changed 2026-06-17 | Public domain |