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

> A heap buffer overflow in openCryptoki allows local attackers to cause denial of service or potential code execution via crafted EC public keys.

- **Severity:** Medium 6.6 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jan 2026
- **Updated:** 13 Jan 2026
- **Also known as:** GHSA-26f5-3mwq-4wm7, SUSE-SU-2026:0291-1, UBUNTU-CVE-2026-22791, openSUSE-SU-2026:10048-1

## What is CVE-2026-22791?

CVE-2026-22791 is a medium-severity memory corruption vulnerability in opencryptoki, published on 13 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-131 (Incorrect Calculation of Buffer Size)

## Which versions are affected by CVE-2026-22791?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openCryptoki` | SUSE:Linux Enterprise Module for Server Applications 15 SP7 | All versions | 3.26.0-150700.5.9.1 |
| `openCryptoki` | openSUSE:Tumbleweed | All versions | 3.26.0-3.1 |

Products: Opencryptoki Project Opencryptoki.

## How do I fix CVE-2026-22791?

Apply the vendor's patch.

## Is CVE-2026-22791 being exploited?

There is no known exploitation of CVE-2026-22791 in the wild and no public exploit code.

## Other vulnerabilities in opencryptoki

- [CVE-2026-40253](https://insights.sbomify.com/CVE-2026-40253/): openCryptoki: Memory safety vulnerabilities in BER/DER decoders in asn1.c (medium 6.8)
- [CVE-2026-23893](https://insights.sbomify.com/CVE-2026-23893/): openCryptoki has improper link resolution before file access (link following) (medium 6.8)
- [CVE-2012-4455](https://insights.sbomify.com/CVE-2012-4455/): Path traversal in n/a (medium 6.2)
- [CVE-2024-0914](https://insights.sbomify.com/CVE-2024-0914/): Opencryptoki: timing side-channel in handling of rsa pkcs#1 v1.5 padded ciphertexts (marvin) (medium 5.9)
- [CVE-2021-3798](https://insights.sbomify.com/CVE-2021-3798/): Information disclosure in opencryptoki (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-22791 and fix it if it is affected.

What it is: CVE-2026-22791 is a medium-severity memory corruption vulnerability in opencryptoki, published on 13 Jan 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-22791 in the wild and no public exploit code.

Affected product: opencryptoki. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-22791/ (Markdown: https://insights.sbomify.com/CVE-2026-22791/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-22791
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-22791
- OSV: https://osv.dev/vulnerability/CVE-2026-22791

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-22791/
Summaries are generated and may contain mistakes; the official description above is the record.
