See how opencryptoki compares to other vendors in security performance
openCryptoki is a PKCS#11 library and provides tooling for Linux and AIX. In versions 3.26.0 and below, the BER/DER decoding functions in the shared common library (asn1.c) accept a raw pointer but no buffer length parameter, and trust attacker-controlled BER length fields without validating them against actual buffer boundaries. All primitive decoders are affected: berdecodeINTEGER, berdecodeSEQUENCE, berdecodeOCTETSTRING, berdecodeBITSTRING, and berdecodeCHOICE. Additionally, berdecodeINTEGER can produce integer underflows when the encoded length is zero. An attacker supplying a malformed BER-encoded cryptographic object through PKCS#11 operations such as CCreateObject or CUnwrapKey, token loading from disk, or remote backend communication can trigger out-of-bounds reads. This affects all token backends (Soft, ICA, CCA, TPM, EP11, ICSF) since the vulnerable code is in the shared common library. A patch is available thorugh commit ed378f463ef73364c89feb0fc923f4dc867332a3.
Last updated 1 September 2026
openCryptoki is a PKCS#11 library and provides tooling for Linux and AIX. Versions 2.3.2 and above are vulnerable to symlink-following when running in privileged contexts. A token-group user can redirect file operations to arbitrary filesystem targets by planting symlinks in group-writable token directories, resulting in privilege escalation or data exposure. Token and lock directories are 0770 (group-writable for token users), so any token-group member can plant files and symlinks inside them. When run as root, the base code handling token directory file access, as well as several openCryptoki tools used for administrative purposes, may reset ownership or permissions on existing files inside the token directories. An attacker with token-group membership can exploit the system when an administrator runs a PKCS#11 application or administrative tool that performs chown on files inside the token directory during normal maintenance. This issue is fixed in commit 5e6e4b4, but has not been included in a released version at the time of publication.
Last updated 1 September 2026
Last updated 1 September 2026
Description: A timing side-channel in handling of RSA PKCS#1 v1.5 padded ciphertexts was discovered in the opencryptoki package. This side-channel can be used to perform RSA ciphertext decryption or signing without access to the private key. To achieve a successful decryption the attack would need to send a large amount of specifically crafted messages to a service that uses the vulnerable API.
Fixed in: No fixed-in version yet, but a new release is expected in the next 3 weeks or so. Patches are already merged though.
References: https://github.com/opencryptoki/opencryptoki/issues/731 https://github.com/opencryptoki/opencryptoki/pull/737 https://github.com/opencryptoki/opencryptoki/commit/2ea019ee2b09f15724d808382d53baca03403288 https://github.com/opencryptoki/opencryptoki/commit/7ffc0e135b4d923d686be536aa7bf69405a360a1 https://github.com/opencryptoki/opencryptoki/commit/c26e049bf40d656bc51429bad190b82fbf63f0c7 https://people.redhat.com/~hkario/marvin/
It was discovered that openCryptoki incorrectly handled certain EC keys. An attacker could possibly use this issue to cause a invalid curve attack.
Reference: https://packetstormsecurity.com/files/163741/USN-5031-1.txt
Upstream patch: https://github.com/opencryptoki/opencryptoki/commit/4e3b43c3d8844402c04a66b55c6c940f965109f0