Skip to main content

openCryptoki EUVDEUVD-2026-23318

| CVE-2026-40253 MEDIUM
Out-of-bounds Read (CWE-125)
2026-04-16 GitHub_M
6.8
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
6.8 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
vuln.today AI
6.8 MEDIUM

Any local process can invoke PKCS#11 API without elevated privileges; OOB read yields high availability impact and limited memory disclosure with no integrity consequence.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
MEDIUM
qualitative
Red Hat
6.8 MEDIUM
qualitative

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
High

Lifecycle Timeline

5
Source Code Evidence Fetched
Jul 24, 2026 - 07:17 vuln.today
Analysis Generated
Jul 24, 2026 - 07:17 vuln.today
Patch released
Apr 19, 2026 - 08:30 nvd
Patch available
EUVD ID Assigned
Apr 16, 2026 - 22:45 euvd
EUVD-2026-23318
CVE Published
Apr 16, 2026 - 22:04 nvd
MEDIUM 6.8

DescriptionGitHub Advisory

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.

AnalysisAI

Out-of-bounds reads in openCryptoki's BER/DER decoding layer expose Linux and AIX systems to cryptographic service disruption and limited memory disclosure across all token backends. All five primitive decoders in the shared asn1.c library lack buffer-length parameters, accepting attacker-controlled BER length fields without validating them against actual buffer boundaries - a condition reachable via PKCS#11 API operations (C_CreateObject, C_UnwrapKey), token file loading from disk, or remote backend channels (ICSF). Proof-of-concept code exists per SSVC classification, though EPSS sits at 0.01% and no confirmed active exploitation (CISA KEV) has been recorded.

Technical ContextAI

openCryptoki implements the PKCS#11 cryptographic token interface standard for Linux and AIX, providing a shared library layer used by applications to interact with hardware security modules (HSMs) and software tokens. The vulnerable code is in usr/lib/common/asn1.c, which handles BER/DER (Basic Encoding Rules / Distinguished Encoding Rules) parsing for ASN.1-structured cryptographic objects such as keys and certificates. The root cause (CWE-125, Out-of-bounds Read) is that five decoder functions - ber_decode_INTEGER, ber_decode_SEQUENCE, ber_decode_OCTET_STRING, ber_decode_BIT_STRING, and ber_decode_CHOICE - accept a raw byte pointer with no corresponding buffer-length argument, so they trust the attacker-supplied BER length octets to determine how many bytes to read. The commit diff confirms the fix pattern: each function signature gained a CK_ULONG buffer-length parameter and now validates that 1 + tag + length + value does not exceed the supplied bound before dereferencing. A secondary variant exists in ber_decode_INTEGER where a zero-length encoding causes an integer underflow. Because asn1.c is the shared common library, all six token backends - Soft, ICA, CCA, TPM, EP11, and ICSF - inherit the flaw.

RemediationAI

Apply the upstream fix from commit ed378f463ef73364c89feb0fc923f4dc867332a3 (https://github.com/opencryptoki/opencryptoki/commit/ed378f463ef73364c89feb0fc923f4dc867332a3); no official tagged release incorporating this fix has been independently confirmed at time of analysis, so users should build from the patched commit or await their distribution's packaged update. As compensating controls pending patch availability: restrict access to C_CreateObject and C_UnwrapKey PKCS#11 operations to authenticated, authorized processes using slot-level access controls, limiting the API-invocation attack path (trade-off: may restrict legitimate application access); ensure token files on disk are owned by and writable only by the openCryptoki daemon account, blocking the disk-based malformed-file path (trade-off: no operational impact if administrative controls are already in place); disable or network-isolate the ICSF remote backend if not operationally required, since that path enables network-adjacent attackers to supply malformed BER data (trade-off: loss of ICSF connectivity). The security advisory is at https://github.com/opencryptoki/opencryptoki/security/advisories/GHSA-c9cf-6vr4-wfxm.

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Micro 5.4 Fixed
SUSE Linux Enterprise Micro 5.5 Fixed
SUSE Linux Enterprise Module for Server Applications 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed

Share

EUVD-2026-23318 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy