cryptoki is vulnerable to Out-of-bounds Read
51
Medium Risk
Affected versions of cryptoki treat the PKCS #11 CKA_ALLOWED_MECHANISMS ulValueLen byte count as a CK_MECHANISM_TYPE element count. Reading a valid nonempty attribute through the safe Session::get_attributes API can therefore construct an out-of-bounds slice and trigger undefined behavior. That can crash the process or cause a denial of service, and may disclose adjacent heap words through decoded mechanism values. The fix interprets the length as a byte count when decoding the attribute. cryptoki-sys is not affected.
You are affected if you are using a version that falls within the vulnerable range and request AttributeType::AllowedMechanisms through Session::get_attributes. Exploitability depends on who can influence the PKCS #11 provider or object response.
cryptoki is vulnerable to Out-of-bounds Read in versions 0.12.0 - 0.12.0, 0.11.0 - 0.11.0 and 0.1.0 - 0.10.0.
Upgrade the cryptoki library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.