CVE-2026-22791
Unknown Unknown - Not Provided
Heap Buffer Overflow in openCryptoki CKM_ECDH_AES_KEY_WRAP Causes DoS

Publication date: 2026-01-13

Last updated on: 2026-02-03

Assigner: GitHub, Inc.

Description
openCryptoki is a PKCS#11 library and tools for Linux and AIX. In 3.25.0 and 3.26.0, there is a heap buffer overflow vulnerability in the CKM_ECDH_AES_KEY_WRAP implementation allows an attacker with local access to cause out-of-bounds writes in the host process by supplying a compressed EC public key and invoking C_WrapKey. This can lead to heap corruption, or denial-of-service.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-01-13
Last Modified
2026-02-03
Generated
2026-05-07
AI Q&A
2026-01-14
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
opencryptoki opencryptoki 3.25.0
opencryptoki opencryptoki 3.26.0
opencryptoki_project opencryptoki 3.25.0
opencryptoki_project opencryptoki 3.26.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-131 The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-22791 is a heap buffer overflow vulnerability in the OpenCryptoki library versions 3.25.0 and 3.26.0, specifically in the CKM_ECDH_AES_KEY_WRAP mechanism. The flaw occurs because the code incorrectly calculates the buffer size needed during the C_WrapKey operation when using a compressed elliptic curve (EC) public key. The buffer size is underestimated since it uses the compressed EC public key length, but the actual data copied is the longer uncompressed EC point. This causes out-of-bounds writes leading to heap corruption or denial-of-service when an attacker with local access supplies a compressed EC public key and invokes C_WrapKey. [2, 3]


How can this vulnerability impact me? :

This vulnerability can lead to heap corruption or denial-of-service (DoS) in the host process running OpenCryptoki. An attacker with local access and low complexity can exploit this by supplying a specially crafted compressed EC public key during key wrapping operations, causing out-of-bounds writes. This may crash the application or cause unpredictable behavior, impacting availability. The confidentiality and integrity impacts are low. [2]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking if your system is running OpenCryptoki versions 3.25.0 or 3.26.0 and if the CKM_ECDH_AES_KEY_WRAP mechanism is used with compressed EC public keys during C_WrapKey operations. Since the vulnerability involves a heap buffer overflow triggered by supplying a compressed EC public key, you can monitor or audit usage of the C_WrapKey function with this mechanism. Specific commands to detect this vulnerability are not provided in the resources. However, you can check the installed OpenCryptoki version using package management commands (e.g., `rpm -qi opencryptoki` or `dpkg -s opencryptoki`) and review application logs or enable debugging to detect abnormal crashes or heap corruption related to key wrapping operations. [2]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include upgrading OpenCryptoki to a version that includes the patch fixing this vulnerability (the fix is available in the commit e37e9127deeeb7bf3c3c4d852c594256c57ec3a8). If upgrading is not immediately possible, avoid using the CKM_ECDH_AES_KEY_WRAP mechanism with compressed EC public keys in C_WrapKey operations, or restrict local access to trusted users only, since the vulnerability requires local attacker privileges. Applying the patch or updating to a fixed version will correct the buffer size calculation and prevent heap buffer overflow. [2, 3]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart