Email me

Rust advisories / metacall

VulnerabilityRUSTSEC-2026-0156 · metacall

RUSTSEC-2026-0156: Bad-free in `MetaCallException::new`

Short answerA security vulnerability in the metacall crate: Bad-free in `MetaCallException::new`. No severity score was published. No fixed version: replace the crate or remove the affected code path.

Cratemetacall
TypeVulnerability (memory-corruption)
Affected versionsEvery version.
Fixed innone
Severitynot scored
Published2026-06-01
Last changed2026-06-03
Also known asnone

What to do

  1. Find who pulls it in: cargo tree -i metacall.
  2. Avoid the affected API, or replace the crate.

Details from the advisory

exception_struct is a local stack variable, but the code passes its address to the C language as &mut exception_struct as *mut _ as *mut c_void. Then, the returned MetaCallException value is stored here:

Ok(Self {
    exception_struct: Arc::new(exception_struct),
    value: exception_ptr,
    leak: false,
})

Because leak is false, the destructor will run later. But the original exception pointer points to Rust stack memory.

Trigger

#[test]
fn exception_bad_free_safe_api() {
    let original = metacall::MetaCallException::new(
        "test",
        "test",
        "test",
        1,
    );

    drop(original); // AddressSanitizer: bad-free
}

Impact

Every time the MetaCallException is created, when it is dropped, it leads to a bad-free. This can be triggered through the safe public API MetaCallException::new(), with no unsafe required from the caller.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for metacall

Full security history of metacall

Up next

Same cratemetacall: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ