{"answers":{"affected":"3 open source packages ship an affected version, including vm-memory. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-41051 in the wild and no public exploit code.","fix":"Upgrade vm-memory to 0.12.2 or later.","what":"CVE-2023-41051 is a low-severity memory corruption vulnerability in rust-vmm vm-memory, published on 1 Sep 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-41051 and fix it if it is affected.\n\nWhat it is: CVE-2023-41051 is a low-severity memory corruption vulnerability in rust-vmm vm-memory, published on 1 Sep 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2023-41051 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- vm-memory (crates.io): affected all versions; fixed in 0.12.2\n- vm-memory (crates.io): affected all versions; fixed in 0.12.2\n- vm-memory (crates.io): affected from 0.0.0-0; fixed in 0.12.2\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-2023-41051/ (Markdown: https://insights.sbomify.com/CVE-2023-41051/index.md)","id":"CVE-2023-41051","markdown":"https://insights.sbomify.com/CVE-2023-41051/index.md","name":"CVE-2023-41051","record":{"aliases":["DEBIAN-CVE-2023-41051","GHSA-49hh-fprx-m68g","RUSTSEC-2023-0056"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Rust VM memory library","requires_auth":"none","summary":"Out-of-bounds memory access in vm-memory allows attackers to cause crashes or execute code via custom implementations.","user_interaction":"required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"vm-memory","vendor":"vm-memory_project"}],"cvss":{"score":2.5,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"description":"In a typical Virtual Machine Monitor (VMM) there are several components, such as boot loader, virtual device drivers, virtio backend drivers and vhost drivers, that need to access the VM physical memory. The vm-memory rust crate provides a set of traits to decouple VM memory consumers from VM memory providers. An issue was discovered in the default implementations of the `VolatileMemory::{get_atomic_ref, aligned_as_ref, aligned_as_mut, get_ref, get_array_ref}` trait functions, which allows out-of-bounds memory access if the `VolatileMemory::get_slice` function returns a `VolatileSlice` whose length is less than the function’s `count` argument. No implementations of `get_slice` provided in `vm_memory` are affected. Users of custom `VolatileMemory` implementations may be impacted if the custom implementation does not adhere to `get_slice`'s documentation. The issue started in version 0.1.0 but was fixed in version 0.12.2 by inserting a check that verifies that the `VolatileSlice` returned by `get_slice` is of the correct length. Users are advised to upgrade. There are no known workarounds for this issue.","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":"Default functions in VolatileMemory trait lack bounds checks in vm-memory","id":"CVE-2023-41051","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":3,"n_references":6,"next":{"headline":"Vyper: incorrect order of evaluation of side effects for some builtins","id":"CVE-2023-41052"},"packages":[{"ecosystem":"crates.io","fixed":["0.12.2"],"introduced":["0"],"last_affected":[],"package":"vm-memory","purl":null,"source":"GHSA-49hh-fprx-m68g"},{"ecosystem":"crates.io","fixed":["0.12.2"],"introduced":["0"],"last_affected":[],"package":"vm-memory","purl":"pkg:cargo/vm-memory","source":"GHSA-49hh-fprx-m68g"},{"ecosystem":"crates.io","fixed":["0.12.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"vm-memory","purl":"pkg:cargo/vm-memory","source":"RUSTSEC-2023-0056"}],"prev":{"headline":"Information disclosure through Python's \"format\" functionality in Zope AccessControl","id":"CVE-2023-41050"},"products":["vm-memory"],"published":"2023-09-01","related":[{"cvss_score":7.5,"headline":"Improper Synchronization and Race Condition in vm-memory","id":"CVE-2020-13759","kev_date_added":null,"published":"2020-06-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-02-13","vendors":["rust-vmm"]},"summary":"Out-of-bounds memory access in vm-memory allows attackers to cause crashes or execute code via custom implementations.","url":"https://insights.sbomify.com/CVE-2023-41051/"}