# RUSTSEC-2026-0131: Double-free in Chomp::inner()

- Database: RustSec
- Published: 2026-05-02
- Modified: 2026-05-13

## Affected versions

- bitchomp (crates.io): all versions

## Description

`Chomp::inner()` uses `std::ptr::read_unaligned` to move out the value from a
raw pointer. If the original value is an owned type (e.g. `Box`), calling
`inner()` moves out the ownership, but the original variable will still be
dropped at the end of its scope. This causes the same heap memory to be freed
twice, resulting in a double-free and undefined behavior.

This can be triggered through safe public APIs — `Chomp::new()` and
`Chomp::inner()` — with no `unsafe` required from the caller.

## References

- https://crates.io/crates/bitchomp
- https://rustsec.org/advisories/RUSTSEC-2026-0131.html
- https://github.com/KingPEPSALT/bitchomp/issues/5

Page: https://cve.now/RUSTSEC-2026-0131

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
