# CVE-2026-22791: openCryptoki incorrectly calculates the buffer size in C_WrapKey with CKM_ECDH_AES_KEY_WRAP

- Severity: Medium 6.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 22% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-13T19:06:41.052Z
- Modified: 2026-06-17T10:20:26.087Z
- Weaknesses: CWE-131
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- opencryptoki opencryptoki: >= 3.25.0, <= 3.26.0
- opencryptoki_project opencryptoki: 3.25.0; 3.26.0

## Every score

- GitHub_M: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H`

## References

- <https://github.com/opencryptoki/opencryptoki/security/advisories/GHSA-26f5-3mwq-4wm7> (exploit, patch, vendor-advisory)
- <https://github.com/opencryptoki/opencryptoki/commit/785d7577e1477d12fbe235554e7e7b24f2de34b7> (patch)
- <https://github.com/opencryptoki/opencryptoki/commit/e37e9127deeeb7bf3c3c4d852c594256c57ec3a8> (patch)

## Sources

- CVE List: [CVE-2026-22791](https://www.cve.org/CVERecord?id=CVE-2026-22791), CVE Terms of Use, modified 2026-01-13
- NVD: [CVE-2026-22791](https://nvd.nist.gov/vuln/detail/CVE-2026-22791), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-22791 · Whole record: https://cve.day/CVE-2026-22791.json · Rebuilt by cve.day 2026-11-25T22:59:12.813Z
