{"id":"CVE-2022-39354","aliases":["CVE-2022-39354","GHSA-hhc4-47rh-cr34","RUSTSEC-2022-0083"],"related":[],"kind":"vulnerability","state":"published","title":"evm has incorrect is_static parameter for custom stateful precompiles","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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)","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"SputnikVM, también llamado evm, es una implementación en Rust de la máquina virtual de Ethereum. Una precompilación personalizada con estado puede usar el parámetro \"is_static\" para determinar si la llamada es ejecutada en un contexto estático (por medio de \"STATICCALL\"), y así decidir si es debido realizar operaciones con estado. versiones anteriores a 0.36.0, el parámetro pasado \"is_static\" era incorrecto -- sólo se ponía a \"true\" si la llamada provenía de un opcode directo \"STATICCALL\". Sin embargo, una vez que es introducido un contexto de llamada estática, debería permanecer estático. El problema sólo afecta a los precompiladores personalizados que realmente usan \"is_static\". Para los afectados, el problema puede conllevar a posibles transiciones de estado incorrectas. La versión 0.36.0 contiene un parche. No se presentan mitigaciones conocidas","source":"nvd"}],"published":"2022-10-25T00:00:00.000Z","modified":"2026-06-17T04:58:12.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-670"],"affected":[{"ranges":[{"version":"< 0.36.0","status":"affected"}],"vendor":"rust-blockchain","product":"evm","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.36.0"}],"ecosystem":"crates.io","package":"evm","purl":"pkg:cargo/evm","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.36.0"}],"ecosystem":"crates.io","package":"evm","purl":"pkg:cargo/evm","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.36.0"}],"vendor":"evm_project","product":"evm","cpe":"cpe:2.3:a:evm_project:evm:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rust-blockchain/evm/security/advisories/GHSA-hhc4-47rh-cr34","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rust-blockchain/evm/pull/133","tags":["patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39354","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rust-blockchain/evm","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0083.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/evm","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T13:55:44.553Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-39354","url":"https://www.cve.org/CVERecord?id=CVE-2022-39354","licence":"CVE Terms of Use","modified":"2025-04-23T16:43:37.219Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hhc4-47rh-cr34","url":"https://github.com/advisories/GHSA-hhc4-47rh-cr34","licence":"CC-BY-4.0","modified":"2023-11-08T04:10:19.736Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2022-0083","url":"https://rustsec.org/advisories/RUSTSEC-2022-0083.html","licence":"CC0-1.0","modified":"2023-11-08T04:10:19.736Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-39354","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39354","licence":"Public domain","modified":"2026-06-17T04:58:12.167Z"}],"updatedAt":"2026-11-25T22:58:16.007Z","epss":{"score":0.00699,"percentile":0.54386,"date":"2026-12-01T12:00:22.000Z"}}