cve.bz

CVE-2026-40253 opencryptoki project opencryptoki: Out-of-bounds Read

6.1 mediumExploit referenceEPSS 0.2%Fix available

Medium (6.1) in opencryptoki project opencryptoki. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

6.1 medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 6th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-04-17. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-125 Out-of-bounds Read
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40253 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40253?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40253?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40253 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
opencryptoki_project:opencryptokithrough 3.26.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12opencryptokino fix listedDEBIAN-CVE-2026-40253
Debian13opencryptoki3.23.0+dfsg-0.3+deb13u1DEBIAN-CVE-2026-40253
Debian14opencryptoki3.27.0-1DEBIAN-CVE-2026-40253
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 1 moreopencryptokino fix listedUBUNTU-CVE-2026-40253
Ubuntu22.04:LTSopencryptoki3.17.0+dfsg+20220202.b40982e-0ubuntu1.3UBUNTU-CVE-2026-40253 USN-8686-1
Ubuntu24.04:LTSopencryptoki3.23.0+dfsg-0ubuntu3.1UBUNTU-CVE-2026-40253 USN-8686-1
Ubuntu26.04:LTSopencryptoki3.26.0+dfsg-0ubuntu1.1UBUNTU-CVE-2026-40253 USN-8707-1
Red Hatenterprise_linux:8::baseosopencryptoki, opencryptoki-libs, opencryptoki-swtok and 14 more0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hatenterprise_linux:8::crbopencryptoki-devel, opencryptoki-debuginfo, opencryptoki-debugsource and 7 more0:3.22.0-3.el8_10.3RHSA-2026:26352
Red Hatenterprise_linux:9::baseosopencryptoki, opencryptoki-libs, opencryptoki-swtok and 12 more0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hatenterprise_linux:9::crbopencryptoki-devel, opencryptoki-debuginfo, opencryptoki-debugsource and 6 more0:3.26.0-2.el9_8.2RHSA-2026:28256
Red Hatenterprise_linux:10.2opencryptoki, opencryptoki-libs, opencryptoki-devel and 13 more0:3.26.0-3.el10_2.1RHSA-2026:28231
Red Hatenterprise_linux_eus:10.0opencryptoki, opencryptoki-libs, opencryptoki-devel and 13 more0:3.24.0-6.el10_0.2RHSA-2026:36697
Red Hatrhel_e4s:9.4::baseosopencryptoki, opencryptoki-libs, opencryptoki-swtok and 12 more0:3.22.0-3.el9_4.3RHSA-2026:33519
Red Hatrhel_eus:9.6::baseosopencryptoki, opencryptoki-libs, opencryptoki-swtok and 12 more0:3.24.0-5.el9_6.2RHSA-2026:36717
Red Hatrhel_eus:9.6::crbopencryptoki-devel, opencryptoki-debuginfo, opencryptoki-debugsource and 6 more0:3.24.0-5.el9_6.2RHSA-2026:36717
SUSELinux Enterprise Micro 5.4openCryptoki3.17.0-150400.4.16.1SUSE-SU-2026:2355-1
SUSELinux Enterprise Module for Server Applications 15 SP7openCryptoki3.26.0-150700.5.17.1SUSE-SU-2026:2757-1
SUSELinux Enterprise Server 12 SP5-LTSSopenCryptoki3.17.0-5.24.1SUSE-SU-2026:2685-2
SUSELinux Enterprise Server 16.0, Linux Enterprise Server for SAP applications 16.0openCryptoki3.27.0-160000.1.1SUSE-SU-2026:22365-1
SUSELinux Enterprise Server LTSS Extended Security 12 SP5openCryptoki3.17.0-5.24.1SUSE-SU-2026:2685-1
SUSELinux Micro 6.2openCryptoki3.27.0-160000.1.1SUSE-SU-2026:22293-1
openSUSELeap 16.0openCryptoki3.27.0-160000.1.1openSUSE-SU-2026:21059-1
openSUSETumbleweedopenCryptoki3.26.0-6.1openSUSE-SU-2026:10593-1
AlmaLinux8opencryptoki, opencryptoki-libs, opencryptoki-devel and 6 more3.22.0-3.el8_10.3ALSA-2026:26352
AlmaLinux9opencryptoki, opencryptoki-libs, opencryptoki-devel and 5 more3.26.0-2.el9_8.2ALSA-2026:28256
AlmaLinux10opencryptoki, opencryptoki-libs, opencryptoki-devel and 5 more3.26.0-3.el10_2.1ALSA-2026:28231
Rocky Linux8opencryptoki0:3.22.0-3.el8_10.3RLSA-2026:26352
Rocky Linux9opencryptoki0:3.26.0-2.el9_8.2RLSA-2026:28256
Rocky Linux10opencryptoki0:3.26.0-3.el10_2.1RLSA-2026:28231
Azure Linux3opencryptokino fix listedAZL-82982

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate severity input validation flaw affects openCryptoki, the PKCS#11 (Cryptographic Token Interface Standard) implementation shipped in Red Hat Enterprise Linux. The BER/DER decoding functions in openCryptoki's shared common library (asn1.c) accept a raw pointer without a buffer length parameter and trust attacker-controlled BER length fields without validating them against the actual buffer boundaries. An attacker who can supply a malformed BER-encoded cryptographic object, for example through PKCS#11 operations such as C_CreateObject or C_UnwrapKey, through loading of a crafted token object from disk, or via remote backend communication, can trigger out-of-bounds reads and integer underflows, resulting in information disclosure and denial of service. Because the vulnerable code resides in the shared common library, all token backends (Soft, ICA, CCA, TPM, EP11, ICSF) are affected. The flaw is rated Moderate severity (CVSS 3.1 score 6.8, AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H), matching the upstream and CVEORG assessments; the NVD score (6.1) differs only marginally and does not change the severity classification. The openCryptoki package in Red Hat Enterprise Linux 6, 7, 8, 9, and 10 is affected: fixes are being pursued for maintained update streams, while the fix is deferred for several older update streams, where the residual risk remains the out-of-bounds read leading to information disclosure and denial of service. The related packages libica, openssl-ibmca, and openssl-ibmpkcs11, and Fedora's opencryptoki package, are not affected because the vulnerable code is not present.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10opencryptoki-0:3.26.0-3.el10_2.1Fixed 2026-06-23RHSA-2026:28231
Red Hat Enterprise Linux 10.0 Extended Update Supportopencryptoki-0:3.24.0-6.el10_0.2Fixed 2026-07-08RHSA-2026:36697
Red Hat Enterprise Linux 8opencryptoki-0:3.22.0-3.el8_10.3Fixed 2026-06-16RHSA-2026:26352
Red Hat Enterprise Linux 9opencryptoki-0:3.26.0-2.el9_8.2Fixed 2026-06-23RHSA-2026:28256
Red Hat Enterprise Linux 9.4 Update Services for SAP Solutionsopencryptoki-0:3.22.0-3.el9_4.3Fixed 2026-06-30RHSA-2026:33519
Red Hat Enterprise Linux 9.6 Extended Update Supportopencryptoki-0:3.24.0-5.el9_6.2Fixed 2026-07-08RHSA-2026:36717
Red Hat Enterprise Linux 10libicaNot affected
Red Hat Enterprise Linux 10openssl-ibmcaNot affected
Red Hat Enterprise Linux 6libicaNot affected
Red Hat Enterprise Linux 6opencryptokiOut of support scope
Red Hat Enterprise Linux 6openssl-ibmcaNot affected
Red Hat Enterprise Linux 7libicaNot affected
Red Hat Enterprise Linux 7opencryptokiFix deferred
Red Hat Enterprise Linux 7openssl-ibmcaNot affected
Red Hat Enterprise Linux 8libicaNot affected
Red Hat Enterprise Linux 8openssl-ibmcaNot affected
Red Hat Enterprise Linux 8openssl-ibmpkcs11Not affected
Red Hat Enterprise Linux 9libicaNot affected
Red Hat Enterprise Linux 9openssl-ibmcaNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-40253.

Attack patterns (CAPEC)

  • CAPEC-540 Overread Buffers Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON