CVE-2026-40253openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c
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: ber_decode_INTEGER, ber_decode_SEQUENCE, ber_decode_OCTET_STRING, ber_decode_BIT_STRING, and ber_decode_CHOICE. Additionally, ber_decode_INTEGER 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 C_CreateObject or C_UnwrapKey, 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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | opencryptoki | Fixed | 3.26.0+dfsg-0ubuntu1.1 | UBUNTU-CVE-2026-40253 |
| Ubuntu 25.10 | opencryptoki | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-40253 | |
| Ubuntu 24.04 | opencryptoki | Fixed | 3.23.0+dfsg-0ubuntu3.1 | UBUNTU-CVE-2026-40253 |
| Ubuntu 22.04 | opencryptoki | Fixed | 3.17.0+dfsg+20220202.b40982e-0ubuntu1.3 | UBUNTU-CVE-2026-40253 |
| Ubuntu 20.04 | opencryptoki | Fix pending | UBUNTU-CVE-2026-40253 | |
| Ubuntu 18.04 | opencryptoki | Fix pending | UBUNTU-CVE-2026-40253 | |
| Ubuntu 16.04 | opencryptoki | Fix pending | UBUNTU-CVE-2026-40253 | |
| Debian 14 | opencryptoki | Fixed | 3.27.0-1 | DEBIAN-CVE-2026-40253 |
| Debian 13 | opencryptoki | Fixed | 3.23.0+dfsg-0.3+deb13u1 | DEBIAN-CVE-2026-40253 |
| Debian 12 | opencryptoki | Fix pending | DEBIAN-CVE-2026-40253 | |
| Red Hat Enterprise Linux 10 | libica | Not affected | ||
| Red Hat Enterprise Linux 10 | libica-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | opencryptoki | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-ccatok | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-devel | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-ep11tok | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-icatok | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-icsftok | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-libs | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | opencryptoki-swtok | Fixed | 0:3.26.0-3.el10_2.1 | RHSA-2026:28231 |
| Red Hat Enterprise Linux 10 | openssl-ibmca | Not affected | ||
| Red Hat Enterprise Linux 9 | libica | Not affected | ||
| Red Hat Enterprise Linux 9 | libica-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | opencryptoki | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-ccatok | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-devel | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-ep11tok | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-icatok | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-icsftok | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-libs | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | opencryptoki-swtok | Fixed | 0:3.26.0-2.el9_8.2 | RHSA-2026:28256 |
| Red Hat Enterprise Linux 9 | openssl-ibmca | Not affected | ||
| Red Hat Enterprise Linux 8 | libica | Not affected | ||
| Red Hat Enterprise Linux 8 | libica-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | opencryptoki | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-ccatok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-devel | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-ep11tok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-icatok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-icsftok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-libs | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-swtok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | opencryptoki-tpmtok | Fixed | 0:3.22.0-3.el8_10.3 | RHSA-2026:26352 |
| Red Hat Enterprise Linux 8 | openssl-ibmca | Not affected | ||
| Red Hat Enterprise Linux 8 | openssl-ibmpkcs11 | Not affected | ||
| Red Hat Enterprise Linux 7 | libica | Not affected | ||
| Red Hat Enterprise Linux 7 | libica-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | opencryptoki | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-ccatok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-devel | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-ep11tok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-icatok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-icsftok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-libs | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-swtok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | opencryptoki-tpmtok | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | openssl-ibmca | Not affected | ||
| Red Hat Enterprise Linux 6 | libica | Not affected | ||
| Red Hat Enterprise Linux 6 | libica-devel | Not affected | ||
| Red Hat Enterprise Linux 6 | opencryptoki | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | opencryptoki-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | opencryptoki-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | openssl-ibmca | Not affected | ||
| AlmaLinux 10 | opencryptoki | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-ccatok | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-devel | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-ep11tok | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-icatok | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-icsftok | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-libs | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 10 | opencryptoki-swtok | Fixed | 3.26.0-3.el10_2.1 | ALSA-2026:28231 |
| AlmaLinux 9 | opencryptoki | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-ccatok | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-devel | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-ep11tok | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-icatok | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-icsftok | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-libs | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 9 | opencryptoki-swtok | Fixed | 3.26.0-2.el9_8.2 | ALSA-2026:28256 |
| AlmaLinux 8 | opencryptoki | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-ccatok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-devel | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-ep11tok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-icatok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-icsftok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-libs | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-swtok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| AlmaLinux 8 | opencryptoki-tpmtok | Fixed | 3.22.0-3.el8_10.3 | ALSA-2026:26352 |
| Rocky Linux 10 | opencryptoki | Fixed | 0:3.26.0-3.el10_2.1 | RLSA-2026:28231 |
| Rocky Linux 9 | opencryptoki | Fixed | 0:3.26.0-2.el9_8.2 | RLSA-2026:28256 |
| Rocky Linux 8 | opencryptoki | Fixed | 0:3.22.0-3.el8_10.3 | RLSA-2026:26352 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- opencryptoki: affected: <= 3.26.0
References
- https://github.com/opencryptoki/opencryptoki/security/advisories/GHSA-c9cf-6vr4-wfxm
- https://github.com/opencryptoki/opencryptoki/commit/ed378f463ef73364c89feb0fc923f4dc867332a3
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.