{"answers":{"affected":"3 open source packages ship an affected version, including evm. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39354 in the wild and no public exploit code.","fix":"Upgrade evm to 0.36.0 or later.","what":"CVE-2022-39354 is a medium-severity vulnerability in rust-blockchain evm, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-39354 and fix it if it is affected.\n\nWhat it is: CVE-2022-39354 is a medium-severity vulnerability in rust-blockchain evm, published on 25 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-39354 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- evm (crates.io): affected all versions; fixed in 0.36.0\n- evm (crates.io): affected all versions; fixed in 0.36.0\n- evm (crates.io): affected from 0.0.0-0; fixed in 0.36.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39354/ (Markdown: https://insights.sbomify.com/CVE-2022-39354/index.md)","id":"CVE-2022-39354","markdown":"https://insights.sbomify.com/CVE-2022-39354/index.md","name":"CVE-2022-39354","record":{"aliases":["GHSA-hhc4-47rh-cr34","RUSTSEC-2022-0083"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Ethereum Virtual Machine","requires_auth":"none","summary":"Incorrect static context handling in custom precompiles allows unauthorized state modifications during static calls in the evm library.","user_interaction":"not_required","vuln_class":"business_logic"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"evm","vendor":"evm_project"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-670","name":"Always-Incorrect Control Flow Implementation"}],"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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"evm has incorrect is_static parameter for custom stateful precompiles","id":"CVE-2022-39354","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"business_logic","year":"2022"},"n_packages":3,"n_references":2,"next":{"headline":"Discourse Patreon vulnerable to improper validation of email during Patreon authentication","id":"CVE-2022-39355"},"packages":[{"ecosystem":"crates.io","fixed":["0.36.0"],"introduced":["0"],"last_affected":[],"package":"evm","purl":null,"source":"GHSA-hhc4-47rh-cr34"},{"ecosystem":"crates.io","fixed":["0.36.0"],"introduced":["0"],"last_affected":[],"package":"evm","purl":"pkg:cargo/evm","source":"GHSA-hhc4-47rh-cr34"},{"ecosystem":"crates.io","fixed":["0.36.0"],"introduced":["0.0.0-0"],"last_affected":[],"package":"evm","purl":"pkg:cargo/evm","source":"RUSTSEC-2022-0083"}],"prev":{"headline":"xmldom allows multiple root nodes in a DOM","id":"CVE-2022-39353"},"products":["evm"],"published":"2022-10-25","related":[{"cvss_score":8.7,"headline":"Specification non-compliance in JUMPI","id":"CVE-2021-41153","kev_date_added":null,"published":"2021-10-18"},{"cvss_score":6.5,"headline":"Memory over-allocation in evm crate","id":"CVE-2021-29511","kev_date_added":null,"published":"2021-05-12"},{"cvss_score":5.9,"headline":"Erroneous handling of `record_external_operation` error return","id":"CVE-2024-21629","kev_date_added":null,"published":"2024-01-02"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["rust-blockchain"]},"summary":"Incorrect static context handling in custom precompiles allows unauthorized state modifications during static calls in the evm library.","url":"https://insights.sbomify.com/CVE-2022-39354/"}