# CVE-2026-10275: OpenSC pkcs11-tool Key Generation pkcs11-tool.c test_kpgen_certwrite buffer overflow

> A buffer overflow in OpenSC's pkcs11-tool allows remote attackers to potentially execute code or cause denial of service via crafted key generation requests.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 1 Jun 2026
- **Updated:** 1 Jun 2026
- **Also known as:** AZL-89376, BELL-CVE-2026-10275, CLSA-2026-1788866231, DEBIAN-CVE-2026-10275, GHSA-c758-vvqj-x96q, UBUNTU-CVE-2026-10275

## What is CVE-2026-10275?

CVE-2026-10275 is a low-severity memory corruption vulnerability in OpenSC, published on 1 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A flaw has been found in OpenSC up to 0.26.1. This affects the function test_kpgen_certwrite of the file src/tools/pkcs11-tool.c of the component pkcs11-tool Key Generation Module. This manipulation causes buffer overflow. The attack is possible to be carried out remotely. The complexity of an attack is rather high. It is indicated that the exploitability is difficult. The exploit has been published and may be used. Patch name: 814f745b3b6d100295f65f1935edd33d520d33ab. It is recommended to apply a patch to fix this issue.

Weakness: CWE-120 (Buffer Copy without Checking Size of Input), CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

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


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

Apply the vendor's patch.

## Is CVE-2026-10275 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-10275 is a low-severity memory corruption vulnerability in OpenSC, published on 1 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-10275 in the wild and no public exploit code.

Affected product: OpenSC. 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-10275/ (Markdown: https://insights.sbomify.com/CVE-2026-10275/index.md)
```

## Sources

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

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