{"id":"RUSTSEC-2026-0139","aliases":["RUSTSEC-2026-0139"],"related":[],"kind":"vulnerability","state":"published","title":"Null-pointer dereference and double-free via safe APIs","summary":"Two soundness violations exist in the Rust bindings for MetaCall:\n\n**Null-pointer dereference:** `MetaCallFuture::new_raw()` accepts a raw\npointer without validation. The `Debug` impl calls `Box::from_raw(self.data)`\non it. Passing a null pointer causes the `Debug` impl to construct a\n`NonNull` from null, producing undefined behavior.\n\n**Double-free:** `MetaCallPointer::clone()` shares the same `rust_value` raw\npointer between the clone and the original. Calling `get_value_untyped()` on\nboth clones calls `Box::from_raw` on the same pointer twice, resulting in a\ndouble-free.\n\nBoth issues can be triggered through safe public APIs —\n`MetaCallFuture::new_raw()`, `MetaCallPointer::new()`, `clone()`, and\n`get_value_untyped()` — with no `unsafe` required from the caller.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"Two soundness violations exist in the Rust bindings for MetaCall:\n\n**Null-pointer dereference:** `MetaCallFuture::new_raw()` accepts a raw\npointer without validation. The `Debug` impl calls `Box::from_raw(self.data)`\non it. Passing a null pointer causes the `Debug` impl to construct a\n`NonNull` from null, producing undefined behavior.\n\n**Double-free:** `MetaCallPointer::clone()` shares the same `rust_value` raw\npointer between the clone and the original. Calling `get_value_untyped()` on\nboth clones calls `Box::from_raw` on the same pointer twice, resulting in a\ndouble-free.\n\nBoth issues can be triggered through safe public APIs —\n`MetaCallFuture::new_raw()`, `MetaCallPointer::new()`, `clone()`, and\n`get_value_untyped()` — with no `unsafe` required from the caller.","format":"markdown","source":"rustsec"}],"published":"2026-05-02T12:00:00.000Z","modified":"2026-05-13T15:00:15.670Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"metacall","purl":"pkg:cargo/metacall","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/metacall","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0139.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/metacall/core/issues/618","tags":["report"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0139","url":"https://rustsec.org/advisories/RUSTSEC-2026-0139.html","licence":"CC0-1.0","modified":"2026-05-13T15:00:15.670Z"}],"updatedAt":"2026-11-25T22:56:43.353Z"}