Erroneous handling of `record_external_operation` error return
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rust-ethereum | evm | before 0.41.1 | 0.41.1 | Patch available | CNA |
| — | evm (crates.io) | before 0.41.1 | 0.41.1 | Patch available | GHSA-27wg-99g8-2v4v |
- evm Vendorrust-ethereum Affected before 0.41.1 Fixed in 0.41.1 Patch available CNA
- evm (crates.io) Vendor— Affected before 0.41.1 Fixed in 0.41.1 Patch available GHSA-27wg-99g8-2v4v
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:evm_project:evm:*:*:*:*:*:rust:*:* | before 0.41.1 | Vulnerable | rust-blockchain |
- cpe:2.3:a:evm_project:evm:*:*:*:*:*:rust:*:* Versions before 0.41.1 Vulnerable ·rust-blockchain
Remediation
- Fix · CNA evm (rust-ethereum) Fixed in 0.41.1
- Fix · GHSA-27wg-99g8-2v4v evm (crates.io) Fixed in 0.41.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-21629
- 2026-10-03 Alias added: GHSA-27wg-99g8-2v4v
References
Patch 2
Advisory 2
More rust-ethereum vulnerabilities
- TI-2025-33323 ethereum does not check transaction malleability for EIP-2930, EIP-1559 and EIP-7702 transactions CVSS 4.0MEDIUM 6.9
Sources
- CVE-2024-21629 · CVE Program
- CVE-2024-21629 · NVD
- FIRST EPSS
- GHSA-27wg-99g8-2v4v · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences