Advisory

RUSTSEC-2026-0286

Also known as: GHSA-r6vc-97x9-63vv

Summary

Out-of-bounds read when decoding CKA_ALLOWED_MECHANISMS

Details

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.

Severity

Not rated by the source.

Dates

Published
2026-09-16 12:00 UTC
Modified
2026-09-17 07:45 UTC

Affected packages and fixes

cryptoki

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.10.1, introduced 0.11.0, fixed 0.11.1, introduced 0.12.0, fixed 0.12.1 (semver)

Fixed versions

0.10.1, 0.11.1, 0.12.1

Fix

  • Fixed version 0.10.1
    cargo update -p cryptoki --precise 0.10.1
  • Fixed version 0.11.1
    cargo update -p cryptoki --precise 0.11.1
  • Fixed version 0.12.1
    cargo update -p cryptoki --precise 0.12.1

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