{"id":"RUSTSEC-2026-0157","summary":"Several memory corruption issues via safe APIs","details":"Several soundness violations exist in the Rust bindings for `MetaCall`, indicatively:\n\n**`MetaCallException::Clone`**: `Clone` is dangerous because it creates a second Rust object that still points to the same foreign `MetaCall` value, but does not actually own or keep that value alive. `value` is shallow copied and `leak=true` does not guarantee safety; `Clone` does not free the `MetaCall` value, but it still stores the same raw pointer. If the original is dropped, the `Clone` can retain a dangling pointer.\n\n**`MetaCallException::new_raw`**: is a safe function that accepts arbitrary raw pointer and dereferences C memory. This function is only correct if the caller gives it a valid, owned `MetaCall` value that must be destroyed by this wrapper. The method should be internal and not exposed to the public API or be declared as unsafe and be correctly documented.\n\nSame issues exist in `MetaCallThrowable::Clone`, `MetaCallThrowable::new_raw`, `MetaCallClass::Clone`, `MetaCallClass::new_raw`, `MetaCallFuture::Clone`, `MetaCallFuture::new_raw`, `MetaCallPointer::Clone`, `MetaCallPointer::new_raw`, `MetaCallFunction::Clone`, `MetaCallFunction::new_raw`, `MetaCallObject::Clone`, and `MetaCallObject::new_raw`. \n\nAll issues can be triggered through safe public APIs.","modified":"2026-06-03T10:45:04.148088680Z","published":"2026-06-01T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/metacall"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0157.html"},{"type":"REPORT","url":"https://github.com/metacall/core/issues/809"}],"affected":[{"package":{"name":"metacall","ecosystem":"crates.io","purl":"pkg:cargo/metacall"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"os":[],"arch":[],"functions":[]}},"database_specific":{"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0157.json","cvss":null,"informational":"unsound","categories":["memory-corruption"]}}],"schema_version":"1.7.5"}