rustsec-2026-0139
Vulnerability from osv_rustsec
Published
2026-05-02 12:00
Modified
2026-05-13 14:54
Summary
Null-pointer dereference and double-free via safe APIs
Details
Two soundness violations exist in the Rust bindings for MetaCall:
Null-pointer dereference: MetaCallFuture::new_raw() accepts a raw
pointer without validation. The Debug impl calls Box::from_raw(self.data)
on it. Passing a null pointer causes the Debug impl to construct a
NonNull from null, producing undefined behavior.
Double-free: MetaCallPointer::clone() shares the same rust_value raw
pointer between the clone and the original. Calling get_value_untyped() on
both clones calls Box::from_raw on the same pointer twice, resulting in a
double-free.
Both issues can be triggered through safe public APIs —
MetaCallFuture::new_raw(), MetaCallPointer::new(), clone(), and
get_value_untyped() — with no unsafe required from the caller.
{
"affected": [
{
"database_specific": {
"categories": [
"memory-corruption"
],
"cvss": null,
"informational": "unsound"
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "metacall",
"purl": "pkg:cargo/metacall"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0-0"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [],
"database_specific": {
"license": "CC0-1.0"
},
"details": "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 \u2014\n`MetaCallFuture::new_raw()`, `MetaCallPointer::new()`, `clone()`, and\n`get_value_untyped()` \u2014 with no `unsafe` required from the caller.",
"id": "RUSTSEC-2026-0139",
"modified": "2026-05-13T14:54:08Z",
"published": "2026-05-02T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/metacall"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2026-0139.html"
},
{
"type": "REPORT",
"url": "https://github.com/metacall/core/issues/618"
}
],
"related": [],
"severity": [],
"summary": "Null-pointer dereference and double-free via safe APIs"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…