{"id":"CVE-2022-39354","aliases":["EUVD-2022-7106","GHSA-hhc4-47rh-cr34","RUSTSEC-2022-0083"],"status":"published","title":"evm has incorrect is_static parameter for custom stateful precompiles","description":"SputnikVM, also called evm, is a Rust implementation of Ethereum Virtual Machine. A custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Prior to version 0.36.0, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call came from a direct `STATICCALL` opcode. However, once a static call context is entered, it should stay static. The issue only impacts custom precompiles that actually uses `is_static`. For those affected, the issue can lead to possible incorrect state transitions. Version 0.36.0 contains a patch. There are no known workarounds.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00699,"percentile":0.53569,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-670"],"published":"2022-10-25T00:00:00Z","modified":"2026-06-17T04:58:12Z","fixes":[{"ecosystem":"crates.io","package":"evm","fixed_in":["0.36.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"evm","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.35.0"},{"fixed":"0.36.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"evm","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.36.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"evm","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.36.0"}]}]}],"products":[{"vendor":"evm_project","product":"evm"},{"vendor":"rust-blockchain","product":"evm"}],"references":[{"url":"https://github.com/rust-blockchain/evm/security/advisories/GHSA-hhc4-47rh-cr34","tags":["x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/rust-blockchain/evm/pull/133","tags":["x_transferred","Patch","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39354","tags":["advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0083.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-hhc4-47rh-cr34"},{"url":"https://github.com/rust-blockchain/evm","tags":["package"]},{"url":"https://crates.io/crates/evm","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-39354","title":"evm has incorrect is_static parameter for custom stateful precompiles","description":"SputnikVM, also called evm, is a Rust implementation of Ethereum Virtual Machine. A custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Prior to version 0.36.0, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call came from a direct `STATICCALL` opcode. However, once a static call context is entered, it should stay static. The issue only impacts custom precompiles that actually uses `is_static`. For those affected, the issue can lead to possible incorrect state transitions. Version 0.36.0 contains a patch. There are no known workarounds.","status":"published","published":"2022-10-25T00:00:00Z","modified":"2025-04-23T16:43:37.219Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-670"],"updated_at":"2026-11-02T14:34:39.559326Z"}],"euvd":[{"id":"EUVD-2022-7106","description":"SputnikVM, also called evm, is a Rust implementation of Ethereum Virtual Machine. A custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Prior to version 0.36.0, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call came from a direct `STATICCALL` opcode. However, once a static call context is entered, it should stay static. The issue only impacts custom precompiles that actually uses `is_static`. For those affected, the issue can lead to possible incorrect state transitions. Version 0.36.0 contains a patch. There are no known workarounds.","status":"published","published":"2022-10-25T00:00:00Z","modified":"2025-04-23T16:43:37Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T20:52:11.891054Z"}],"ghsa":[{"id":"GHSA-hhc4-47rh-cr34","title":"Incorrect is_static parameter for custom stateful precompiles in SputnikVM (evm)","description":"### Impact\n\nA custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Previously, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call comes from a **direct** `STATICCALL` opcode. However, once a static call context is entered, it should stay static. \n\nThe issue only impacts custom precompiles that actually uses `is_static`. The maintainers estimate the usage is low. However, for those affected, it can lead to possible incorrect state transitions.\n\n### Patches\n\nPR: https://github.com/rust-blockchain/evm/pull/133\nReleased in v0.36.0.\n\nOlder patch versions can be released on request if anyone needs them. Simply contact @sorpaas by email to request it.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [evm repo](https://github.com/rust-blockchain/evm)\n* Email Wei at [wei@that.world](mailto:wei@that.world)\n","status":"published","published":"2022-10-25T22:27:21Z","modified":"2023-02-02T17:35:00Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-670"],"updated_at":"2026-11-02T14:36:41.247728Z"}],"nvd":[{"id":"CVE-2022-39354","description":"SputnikVM, also called evm, is a Rust implementation of Ethereum Virtual Machine. A custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Prior to version 0.36.0, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call came from a direct `STATICCALL` opcode. However, once a static call context is entered, it should stay static. The issue only impacts custom precompiles that actually uses `is_static`. For those affected, the issue can lead to possible incorrect state transitions. Version 0.36.0 contains a patch. There are no known workarounds.","status":"published","published":"2022-10-25T19:15:11.79Z","modified":"2026-06-17T04:58:12.167Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high","assessor":"primary"}],"cwes":["CWE-670"],"updated_at":"2026-11-02T14:07:31.127985Z"}],"osv":[{"id":"GHSA-hhc4-47rh-cr34","title":"Incorrect is_static parameter for custom stateful precompiles in SputnikVM (evm)","description":"### Impact\n\nA custom stateful precompile can use the `is_static` parameter to determine if the call is executed in a static context (via `STATICCALL`), and thus decide if stateful operations should be done. Previously, the passed `is_static` parameter was incorrect -- it was only set to `true` if the call comes from a **direct** `STATICCALL` opcode. However, once a static call context is entered, it should stay static. \n\nThe issue only impacts custom precompiles that actually uses `is_static`. The maintainers estimate the usage is low. However, for those affected, it can lead to possible incorrect state transitions.\n\n### Patches\n\nPR: https://github.com/rust-blockchain/evm/pull/133\nReleased in v0.36.0.\n\nOlder patch versions can be released on request if anyone needs them. Simply contact @sorpaas by email to request it.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [evm repo](https://github.com/rust-blockchain/evm)\n* Email Wei at [wei@that.world](mailto:wei@that.world)\n","status":"published","published":"2022-10-25T22:27:21Z","modified":"2023-11-08T04:10:19.736914Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-670"],"updated_at":"2026-11-02T15:46:49.28217Z"},{"id":"RUSTSEC-2022-0083","title":"evm incorrect state transition","description":"SputnikVM, also called evm, is a Rust implementation of Ethereum Virtual Machine.\n\nA custom stateful precompile can use the `is_static` parameter to determine if\nthe call is executed in a static context (via `STATICCALL`), and thus decide\nif stateful operations should be done.\n\nPrior to version 0.36.0, the passed `is_static` parameter was incorrect -- it\nwas only set to `true` if the call came from a direct `STATICCALL` opcode.\n\nHowever, once a static call context is entered, it should stay static. The issue\nonly impacts custom precompiles that actually uses `is_static`.\n\nFor those affected, the issue can lead to possible incorrect state transitions.","status":"published","published":"2022-10-25T12:00:00Z","modified":"2023-11-08T04:10:19.736914Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"high"}],"updated_at":"2026-11-02T15:53:39.971022Z"}]}}
