Skip to content
Noroxi
CVE-2026-40253· NVD / CVE Program· CNA GitHub_M

openCryptoki: 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.

MediumCVSS 6.1 · v3.1—No exploit Fix available
Published
Apr 16, 2026
Updated
Jun 17, 2026
EPSS
0.2% · 5th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

24

Monitor

Low priority for now.

CVSS
24 / 40 · 6.1 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.2%

CISA SSVC decision

Exploitation
proof of concept
Automatable
no
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
6.1
CNA · GitHub_M
6.8
0.7 point gap

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Affected systems

VendorProduct
opencryptoki projectopencryptoki

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • opencryptoki project opencryptokiup to 3.26.0 inclusive

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • opencryptoki opencryptoki

    • <= 3.26.0affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:10opencryptokibefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-ccatokbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-develbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-ep11tokbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-icatokbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-icsftokbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-libsbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:10opencryptoki-swtokbefore 3.26.0-3.el10_2.13.26.0-3.el10_2.1
AlmaLinux:8opencryptokibefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-ccatokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-develbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-ep11tokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-icatokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-icsftokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-libsbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-swtokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:8opencryptoki-tpmtokbefore 3.22.0-3.el8_10.33.22.0-3.el8_10.3
AlmaLinux:9opencryptokibefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-ccatokbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-develbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-ep11tokbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-icatokbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-icsftokbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2
AlmaLinux:9opencryptoki-libsbefore 3.26.0-2.el9_8.23.26.0-2.el9_8.2

+96

Other highest-scoring records for the same primary product.

  • CVE-2026-23893openCryptoki has improper link resolution before file access (link following)
    27Monitor
  • CVE-2026-22791openCryptoki incorrectly calculates the buffer size in C_WrapKey with CKM_ECDH_AES_KEY_WRAP
    24Monitor
  • CVE-2012-4455openCryptoki 2.4.1 allows local users to create or set world-writable permissions on arbitrary files via a symlink attack on the (1) LCK..op
    24Monitor
  • CVE-2024-0914Opencryptoki: timing side-channel in handling of rsa pkcs#1 v1.5 padded ciphertexts (marvin)
    23Monitor
  • CVE-2021-3798A flaw was found in openCryptoki.
    22Monitor
  • CVE-2012-4454openCryptoki before 2.4.1, when using spinlocks, allows local users to create or set world-writable permissions on arbitrary files via a sym
    11Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
almalinux:opencryptoki3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-ccatok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-devel3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-ep11tok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-icatok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-icsftok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-libs3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-swtok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
almalinux:opencryptoki-tpmtok3.22.0-3.el8_10.3 · AlmaLinux:8Package registry (OSV)
debian:opencryptoki3.23.0+dfsg-0.3+deb13u1 · Debian:13Package registry (OSV)
opensuse:openCryptoki3.26.0-6.1 · openSUSE:TumbleweedPackage registry (OSV)
red hat:opencryptoki0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-ccatok0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-ccatok-debuginfo0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-debuginfo0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-debugsource0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-ep11tok0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-ep11tok-debuginfo0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-icatok0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-icatok-debuginfo0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-icsftok0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-icsftok-debuginfo0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
red hat:opencryptoki-libs0:3.22.0-3.el8_10.3 · Red Hat:enterprise_linux:8::baseosPackage registry (OSV)
rocky linux:opencryptoki0:3.22.0-3.el8_10.3 · Rocky Linux:8Package registry (OSV)
suse:openCryptoki3.27.0-160000.1.1 · SUSE:Linux Micro 6.2Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • No account or password is required.
  • A user must open a link or visit a page.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
low · data can be read
Integrity
none
Availability
high · the service can be disrupted
Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality impact
Low
Integrity impact
None
Availability impact
High

Weakness class (CWE)

CWE-125 · Out-of-bounds Read

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H

nvd-primary

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

ATT&CK techniques

—

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records