SecurityContext

CVE-2024-21629: Rust EVM - Undefined

  • Cve: CVE-2024-21629
  • Name: Rust EVM - Undefined
  • Description: Rust EVM is an Ethereum Virtual Machine interpreter. In `rust-evm`, a feature called `record_external_operation` was introduced, allowing library users to record custom gas changes. This feature can have some bogus interactions with the call stack. In particular, during finalization of a `CREATE` or `CREATE2`, in the case that the substack execution happens successfully, `rust-evm` will first commit the substate, and then call `record_external_operation(Write(out_code.len()))`. If `record_external_operation` later fails, this error is returned to the parent call stack, instead of `Succeeded`. Yet, the substate commitment already happened. This causes smart contracts able to commit state changes, when the parent caller contract receives zero address (which usually indicates that the execution has failed). This issue only impacts library users with custom `record_external_operation` that returns errors. The issue is patched in release 0.41.1. No known workarounds are available.
  • Impact: Smart contracts may incorrectly commit state changes even when execution has failed, leading to potential state inconsistency or unintended contract behavior.
  • Remediation: Update to version 0.41.1 or later.
  • Vulnerability impact: data_tampering
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Epss score: 0.00577
  • Epss percentile: 0.48464
  • Assignee: [email protected]
  • Published at: 2024-01-02T22:15:09Z
  • Age in days: 1057
  • Modified at: 2026-06-17T07:09:52Z
  • Patch available: yes
  • References total: 4
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-21629
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: vulnerability type, requirements, hackerone

Cwe

IdName
CWE-703Improper Check or Handling of Exceptional Conditions
NVD-CWE-noinfo—

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/rust-ethereum/evm/commit/d8991ec727ad0fb64fe9957a3cd307387a6701e4Patch
https://github.com/rust-ethereum/evm/pull/264Patch
https://github.com/rust-ethereum/evm/security/advisories/GHSA-27wg-99g8-2v4vVendor Advisory
https://github.com/rust-ethereum/evm/blob/release-v041/src/executor/stack/executor.rs#L1012C25-L1012C69Product

Products

ProductAffectedPlatform boundSourcesUrl
evm_project:evm< 0.41.1nonvd/v1/products/evm_project/evm

Projects

RepositoryLink kindsIndexedUrl
rust-ethereum/evmcommit, fix, package, pull, security_advisoryyes/v1/repositories/rust-ethereum/evm

Index

  • Repositories: 6
  • Repositories high signal: 4
  • Packages: 1

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts