# RUSTSEC-2026-0286: Out-of-bounds read when decoding CKA\_ALLOWED\_MECHANISMS

- Database: RustSec
- Published: 2026-09-16
- Modified: 2026-09-17

## Affected versions

- cryptoki (crates.io): fixed in 0.10.1; from 0.11.0, fixed in 0.11.1; from 0.12.0, fixed in 0.12.1

## Description

`cryptoki` treated the CKA_ALLOWED_MECHANISMS ulValueLen byte count as a
CK_MECHANISM_TYPE element count. A valid nonempty attribute returned through
the safe `Session::get_attributes` API could cause construction of an
out-of-bounds slice and undefined behavior.

Possible consequences include a process crash or denial of service and
potential disclosure of adjacent heap words. Upgrade to the fixed patch release
for the cryptoki 0.10, 0.11, or 0.12 line.

## References

- https://crates.io/crates/cryptoki
- https://rustsec.org/advisories/RUSTSEC-2026-0286.html
- https://github.com/parallaxsecond/rust-cryptoki/pull/368

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

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