CVEfocus › CVE database › CVE-2026-40253

CVE-2026-40253openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c

CVSS 6.8 MediumEPSS 0.2% (higher than 4% of CVEs)Published 2026-04-16Updated 2026-04-17Assigner: GitHub_M

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.

CWE-125

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

58Fixed
13Fix pending
4Will not fix
16Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04opencryptokiFixed3.26.0+dfsg-0ubuntu1.1UBUNTU-CVE-2026-40253
Ubuntu 25.10opencryptokiWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40253
Ubuntu 24.04opencryptokiFixed3.23.0+dfsg-0ubuntu3.1UBUNTU-CVE-2026-40253
Ubuntu 22.04opencryptokiFixed3.17.0+dfsg+20220202.b40982e-0ubuntu1.3UBUNTU-CVE-2026-40253
Ubuntu 20.04opencryptokiFix pendingUBUNTU-CVE-2026-40253
Ubuntu 18.04opencryptokiFix pendingUBUNTU-CVE-2026-40253
Ubuntu 16.04opencryptokiFix pendingUBUNTU-CVE-2026-40253
Debian 14opencryptokiFixed3.27.0-1DEBIAN-CVE-2026-40253
Debian 13opencryptokiFixed3.23.0+dfsg-0.3+deb13u1DEBIAN-CVE-2026-40253
Debian 12opencryptokiFix pendingDEBIAN-CVE-2026-40253
Red Hat Enterprise Linux 10libicaNot affected
Red Hat Enterprise Linux 10libica-develNot affected
Red Hat Enterprise Linux 10opencryptokiFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-ccatokFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-develFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-ep11tokFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-icatokFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-icsftokFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-libsFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10opencryptoki-swtokFixed0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hat Enterprise Linux 10openssl-ibmcaNot affected
Red Hat Enterprise Linux 9libicaNot affected
Red Hat Enterprise Linux 9libica-develNot affected
Red Hat Enterprise Linux 9opencryptokiFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-ccatokFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-develFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-ep11tokFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-icatokFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-icsftokFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-libsFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9opencryptoki-swtokFixed0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hat Enterprise Linux 9openssl-ibmcaNot affected
Red Hat Enterprise Linux 8libicaNot affected
Red Hat Enterprise Linux 8libica-develNot affected
Red Hat Enterprise Linux 8opencryptokiFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-ccatokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-develFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-ep11tokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-icatokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-icsftokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-libsFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-swtokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8opencryptoki-tpmtokFixed0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hat Enterprise Linux 8openssl-ibmcaNot affected
Red Hat Enterprise Linux 8openssl-ibmpkcs11Not affected
Red Hat Enterprise Linux 7libicaNot affected
Red Hat Enterprise Linux 7libica-develNot affected
Red Hat Enterprise Linux 7opencryptokiFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-ccatokFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-develFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-ep11tokFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-icatokFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-icsftokFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-libsFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-swtokFix pending
Fix deferred
Red Hat Enterprise Linux 7opencryptoki-tpmtokFix pending
Fix deferred
Red Hat Enterprise Linux 7openssl-ibmcaNot affected
Red Hat Enterprise Linux 6libicaNot affected
Red Hat Enterprise Linux 6libica-develNot affected
Red Hat Enterprise Linux 6opencryptokiWill not fix
Out of support scope
Red Hat Enterprise Linux 6opencryptoki-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6opencryptoki-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-ibmcaNot affected
AlmaLinux 10opencryptokiFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-ccatokFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-develFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-ep11tokFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-icatokFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-icsftokFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-libsFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 10opencryptoki-swtokFixed3.26.0-3.el10_2.1ALSA-2026:28231
AlmaLinux 9opencryptokiFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-ccatokFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-develFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-ep11tokFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-icatokFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-icsftokFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-libsFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 9opencryptoki-swtokFixed3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux 8opencryptokiFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-ccatokFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-develFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-ep11tokFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-icatokFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-icsftokFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-libsFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-swtokFixed3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux 8opencryptoki-tpmtokFixed3.22.0-3.el8_10.3ALSA-2026:26352
Rocky Linux 10opencryptokiFixed0:3.26.0-3.el10_2.1RLSA-2026:28231
Rocky Linux 9opencryptokiFixed0:3.26.0-2.el9_8.2RLSA-2026:28256
Rocky Linux 8opencryptokiFixed0:3.22.0-3.el8_10.3RLSA-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.

References

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.