RUSTSEC-2026-0157 Several memory corruption issues via safe APIs
Safe API misuse in Rust MetaCall bindings allows memory corruption via dangling pointers or invalid raw pointer dereferences, potentially leading to crashes or code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Not stated
- Victim action needed
- Not needed
- Fix
- None listed
What is RUSTSEC-2026-0157?
RUSTSEC-2026-0157 is a memory corruption vulnerability in metacall, published on 1 Jun 2026.
Official description
Several soundness violations exist in the Rust bindings for MetaCall, indicatively:
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.
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.
Same 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.
All issues can be triggered through safe public APIs.
Which versions are affected by RUSTSEC-2026-0157?
1 open source package ship an affected version, including metacall.
| Package | Affected | Fixed in |
|---|---|---|
metacall crates.io | From 0.0.0-0 | None |
How do I fix RUSTSEC-2026-0157?
No fix has been published for RUSTSEC-2026-0157 yet. Limit exposure of the affected software until one is available.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is RUSTSEC-2026-0157 being exploited?
There is no known exploitation of RUSTSEC-2026-0157 in the wild and no public exploit code.