Advisory

RUSTSEC-2026-0242

Also known as: GHSA-7hc7-h3f2-r4j6

Summary

Safe ErrorRegistry APIs can cause undefined behavior

Details

All published versions of dcrypt-api before 2.0.0 exposed safe
ErrorRegistry operations that could trigger undefined behavior when the
default std feature was enabled.

Stored Box<E> values were erased to raw pointers and later deallocated as
Box<()>. The get_error<E> operation also performed an unchecked cast to a
caller-selected type. Finally, concurrent replacement or clearing could free a
value while another thread cloned it. Ordinary safe Rust could therefore cause
mismatched deallocation, type confusion, and use-after-free. Crates that
re-exported this API are affected transitively.

Version 2.0.0 replaces the raw pointers with owned Box<dyn Any + Send> values
behind a mutex, performs checked downcasts, and uses a mutation generation so
concurrent stores and clears win safely. There is no reliable workaround while
calling the affected registry API. Upgrade to 2.0.0 or later and avoid
process-global error state where possible.

Severity

Not rated by the source.

Dates

Published
2026-08-09 12:00 UTC
Modified
2026-10-12 18:00 UTC

Affected packages and fixes

dcrypt-api

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 2.0.0 (semver)

Fixed versions

2.0.0

Fix

  • Fixed version 2.0.0
    cargo update -p dcrypt-api --precise 2.0.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences