{"id":"GHSA-hhc4-47rh-cr34","summary":"Incorrect is_static parameter for custom stateful precompiles in SputnikVM (evm)","details":"### 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","aliases":["CVE-2022-39354","RUSTSEC-2022-0083"],"modified":"2023-11-08T04:10:19.736914Z","published":"2022-10-25T22:27:21Z","database_specific":{"github_reviewed_at":"2022-10-25T22:27:21Z","nvd_published_at":"2022-10-25T19:15:00Z","cwe_ids":["CWE-670"],"severity":"MODERATE","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/rust-blockchain/evm/security/advisories/GHSA-hhc4-47rh-cr34"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39354"},{"type":"WEB","url":"https://github.com/rust-blockchain/evm/pull/133"},{"type":"PACKAGE","url":"https://github.com/rust-blockchain/evm"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2022-0083.html"}],"affected":[{"package":{"name":"evm","ecosystem":"crates.io","purl":"pkg:cargo/evm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.36.0"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 0.35.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-hhc4-47rh-cr34/GHSA-hhc4-47rh-cr34.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"}]}