# RUSTSEC-2026-0139: Null-pointer dereference and double-free via safe APIs

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-05-02T12:00:00.000Z
- Modified: 2026-05-13T15:00:15.670Z

## Description

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.

(As written by RustSec Advisory Database.)

## Affected

- metacall (crates.io): from 0.0.0-0

## References

- <https://crates.io/crates/metacall> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0139.html> (advisory)
- <https://github.com/metacall/core/issues/618> (report)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0139](https://rustsec.org/advisories/RUSTSEC-2026-0139.html), CC0-1.0, modified 2026-05-13

---

Page: https://cve.day/RUSTSEC-2026-0139 · Whole record: https://cve.day/RUSTSEC-2026-0139.json · Rebuilt by cve.day 2026-11-25T22:56:43.353Z
