CVE-2026-40253 json
openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c
published 6mo ago modified 4mo ago also EUVD-2026-23318
- cvss
- 6.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 5%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- opencryptoki Debian 13 3.23.0+dfsg-0.3+deb13u1
- opencryptoki Debian 14 3.27.0-1
debian advisories DEBIAN-CVE-2026-40253
- opencryptoki Ubuntu 22.04 LTS 3.17.0+dfsg+20220202.b40982e-0ubuntu1.3
- opencryptoki Ubuntu 24.04 LTS 3.23.0+dfsg-0ubuntu3.1
- opencryptoki Ubuntu 26.04 LTS 3.26.0+dfsg-0ubuntu1.1
ubuntu advisories UBUNTU-CVE-2026-40253
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- opencryptoki RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-libs RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-swtok RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-ccatok RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-icatok RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-ep11tok RHEL 9 3.26.0-2.el9_8.2
- opencryptoki-icsftok RHEL 9 3.26.0-2.el9_8.2
- opencryptoki RHEL 10.2 3.26.0-3.el10_2.1
red hat advisories RHSA-2026:36697RHSA-2026:36717RHSA-2026:33519RHSA-2026:28256RHSA-2026:28231RHSA-2026:26352
- openCryptoki SLE Module for Server Applications 15 SP7 3.26.0-150700.5.17.1
- openCryptoki SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 3.27.0-160000.1.1
- openCryptoki SLE Micro 5.4 3.17.0-150400.4.16.1
- openCryptoki SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 3.17.0-5.24.1
suse advisories SUSE-SU-2026:2685-2SUSE-SU-2026:2757-1SUSE-SU-2026:2685-1SUSE-SU-2026:22293-1SUSE-SU-2026:22365-1SUSE-SU-2026:2355-1
- openCryptoki openSUSE Leap 16.0 3.27.0-160000.1.1
- openCryptoki openSUSE Tumbleweed 3.26.0-6.1
opensuse advisories openSUSE-SU-2026:21059-1openSUSE-SU-2026:10593-1
- opencryptoki AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-libs AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-swtok AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-ccatok AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-icatok AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-ep11tok AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki-icsftok AlmaLinux 10 3.26.0-3.el10_2.1
- opencryptoki AlmaLinux 9 3.26.0-2.el9_8.2
almalinux advisories ALSA-2026:28231ALSA-2026:28256ALSA-2026:26352
- opencryptoki Rocky Linux 10 3.26.0-3.el10_2.1
- opencryptoki Rocky Linux 9 3.26.0-2.el9_8.2
- opencryptoki Rocky Linux 8 3.22.0-3.el8_10.3
rocky linux advisories RLSA-2026:28231RLSA-2026:28256RLSA-2026:26352
Is CVE-2026-40253 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-40253 updated cvss 6.8
openCryptoki: openCryptoki: Information disclosure and Denial of Service via malformed BER-encoded cryptographic objects
-
Red Hat Enterprise Linux 6 opencryptoki, opencryptoki-libsaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 7 opencryptoki, opencryptoki-libs, opencryptoki-swtok, opencryptoki-ccatok, opencryptoki-icatok, opencryptoki-tpmtok, +2 moreaffected: workaround, no fix available “Fix deferred”
-
Red Hat CodeReady Linux Builder EUS (v.9.6) opencryptoki-devel 3.24.0-5.el9_6.2, opencryptoki-debuginfo 3.24.0-5.el9_6.2, opencryptoki-debugsource 3.24.0-5.el9_6.2, opencryptoki-libs-debuginfo 3.24.0-5.el9_6.2, opencryptoki-swtok-debuginfo 3.24.0-5.el9_6.2, opencryptoki-ccatok-debuginfo 3.24.0-5.el9_6.2, +3 morefixed: vendor fix RHSA-2026:36717
-
Red Hat Enterprise Linux BaseOS (v. 8) opencryptoki 3.22.0-3.el8_10.3, opencryptoki-libs 3.22.0-3.el8_10.3, opencryptoki-swtok 3.22.0-3.el8_10.3, opencryptoki-ccatok 3.22.0-3.el8_10.3, opencryptoki-icatok 3.22.0-3.el8_10.3, opencryptoki-tpmtok 3.22.0-3.el8_10.3, +2 morefixed: vendor fix RHSA-2026:26352
-
Red Hat Enterprise Linux BaseOS (v. 9) opencryptoki 3.26.0-2.el9_8.2, opencryptoki-libs 3.26.0-2.el9_8.2, opencryptoki-swtok 3.26.0-2.el9_8.2, opencryptoki-ccatok 3.26.0-2.el9_8.2, opencryptoki-icatok 3.26.0-2.el9_8.2, opencryptoki-ep11tok 3.26.0-2.el9_8.2, +1 morefixed: vendor fix RHSA-2026:28256
-
Red Hat Enterprise Linux BaseOS (v. 10) opencryptoki 3.26.0-3.el10_2.1, opencryptoki-libs 3.26.0-3.el10_2.1, opencryptoki-swtok 3.26.0-3.el10_2.1, opencryptoki-ccatok 3.26.0-3.el10_2.1, opencryptoki-icatok 3.26.0-3.el10_2.1, opencryptoki-ep11tok 3.26.0-3.el10_2.1, +1 morefixed: vendor fix RHSA-2026:28231
-
Red Hat Enterprise Linux BaseOS E4S (v.9.4) opencryptoki 3.22.0-3.el9_4.3, opencryptoki-libs 3.22.0-3.el9_4.3, opencryptoki-swtok 3.22.0-3.el9_4.3, opencryptoki-ccatok 3.22.0-3.el9_4.3, opencryptoki-icatok 3.22.0-3.el9_4.3, opencryptoki-ep11tok 3.22.0-3.el9_4.3, +1 morefixed: vendor fix RHSA-2026:33519
-
Red Hat Enterprise Linux BaseOS EUS (v. 10.0) opencryptoki 3.24.0-6.el10_0.2, opencryptoki-libs 3.24.0-6.el10_0.2, opencryptoki-swtok 3.24.0-6.el10_0.2, opencryptoki-ccatok 3.24.0-6.el10_0.2, opencryptoki-icatok 3.24.0-6.el10_0.2, opencryptoki-ep11tok 3.24.0-6.el10_0.2, +1 morefixed: vendor fix RHSA-2026:36697
show 6 moreshow fewer
-
Red Hat Enterprise Linux BaseOS EUS (v.9.6) opencryptoki 3.24.0-5.el9_6.2, opencryptoki-libs 3.24.0-5.el9_6.2, opencryptoki-swtok 3.24.0-5.el9_6.2, opencryptoki-ccatok 3.24.0-5.el9_6.2, opencryptoki-icatok 3.24.0-5.el9_6.2, opencryptoki-ep11tok 3.24.0-5.el9_6.2, +1 morefixed: vendor fix RHSA-2026:36717
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) opencryptoki-devel 3.26.0-2.el9_8.2, opencryptoki-debuginfo 3.26.0-2.el9_8.2, opencryptoki-debugsource 3.26.0-2.el9_8.2, opencryptoki-libs-debuginfo 3.26.0-2.el9_8.2, opencryptoki-swtok-debuginfo 3.26.0-2.el9_8.2, opencryptoki-ccatok-debuginfo 3.26.0-2.el9_8.2, +3 morefixed: vendor fix RHSA-2026:28256
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) opencryptoki-devel 3.26.0-3.el10_2.1, opencryptoki-debuginfo 3.26.0-3.el10_2.1, opencryptoki-debugsource 3.26.0-3.el10_2.1, opencryptoki-libs-debuginfo 3.26.0-3.el10_2.1, opencryptoki-swtok-debuginfo 3.26.0-3.el10_2.1, opencryptoki-ccatok-debuginfo 3.26.0-3.el10_2.1, +3 morefixed: vendor fix RHSA-2026:28231
-
Red Hat Enterprise Linux CodeReady Linux Builder EUS (v. 10.0) opencryptoki-devel 3.24.0-6.el10_0.2, opencryptoki-debuginfo 3.24.0-6.el10_0.2, opencryptoki-debugsource 3.24.0-6.el10_0.2, opencryptoki-libs-debuginfo 3.24.0-6.el10_0.2, opencryptoki-swtok-debuginfo 3.24.0-6.el10_0.2, opencryptoki-ccatok-debuginfo 3.24.0-6.el10_0.2, +3 morefixed: vendor fix RHSA-2026:36697
-
Red Hat Enterprise Linux CRB (v. 8) opencryptoki-devel 3.22.0-3.el8_10.3, opencryptoki-debuginfo 3.22.0-3.el8_10.3, opencryptoki-debugsource 3.22.0-3.el8_10.3, opencryptoki-libs-debuginfo 3.22.0-3.el8_10.3, opencryptoki-swtok-debuginfo 3.22.0-3.el8_10.3, opencryptoki-ccatok-debuginfo 3.22.0-3.el8_10.3, +4 morefixed: vendor fix RHSA-2026:26352
-
Red Hat Enterprise Linux 6 libica, openssl-ibmca Red Hat Enterprise Linux 7 libica, openssl-ibmca Red Hat Enterprise Linux 8 libica, openssl-ibmca, openssl-ibmpkcs11 Red Hat Enterprise Linux 9 libica, openssl-ibmca Red Hat Enterprise Linux 10 libica, openssl-ibmcanot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 6mo ago
Exploit prediction
0.16% chance of exploitation in the next 30 days, higher than 5% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/opencryptoki/opencryptoki/security/advisories/GHSA-c9cf-6vr4-wfxm referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H |
Affected products
- opencryptoki opencryptoki
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
References
-
github.com
/opencryptoki/opencryptoki/commit/ed378f463ef73364c89feb0fc923f4dc867332a3
patch
-
github.com
/opencryptoki/opencryptoki/security/advisories/GHSA-c9cf-6vr4-wfxm
exploit, mitigation, patch, vendor-advisory
Sources
- CVE List CVE-2026-40253
- NVD CVE-2026-40253
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.