# CVE-2021-29511: Memory over-allocation in evm crate

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.42%, higher than 73% of CVEs (2026-12-01)
- Published: 2021-05-12T17:15:11.000Z
- Modified: 2026-07-08T06:27:57.379Z
- Also known as: GHSA-4jwq-572w-4388
- Weaknesses: CWE-770, CWE-787
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- rust-blockchain evm: < 0.21.1; = 0.22.0; = 0.23.0; = 0.24.0; = 0.25.0
- 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
- 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
- evm_project evm: up to 0.21.0; 0.22.0; 0.23.0; 0.24.0; 0.25.0; 0.26.0

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:N/I:N/A:P`

## 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

- CVE List: [CVE-2021-29511](https://www.cve.org/CVERecord?id=CVE-2021-29511), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-4jwq-572w-4388](https://github.com/advisories/GHSA-4jwq-572w-4388), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-29511](https://nvd.nist.gov/vuln/detail/CVE-2021-29511), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-29511 · Whole record: https://cve.day/CVE-2021-29511.json · Rebuilt by cve.day 2026-11-25T22:58:01.318Z
