Skip to main content

OpenSC pkcs11-tool EUVDEUVD-2026-33680

| CVE-2026-10275 LOW
Classic Buffer Overflow (CWE-120)
2026-06-01 VulDB GHSA-c758-vvqj-x96q
1.3
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker crafts PKCS#11 URI with oversized object ID
  2. Delivery
    Deliver crafted URI to target user via social engineering
  3. Exploit
    User runs pkcs11-tool key generation with malicious URI
  4. Execution
    test_kpgen_certwrite copies object ID without bounds check
  5. Persist
    opt_object_id buffer overflows into adjacent memory
  6. Impact
    Limited corruption of process confidentiality, integrity, or availability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer copy size validation
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation specifically requires a user to invoke pkcs11-tool's key generation functionality and supply a PKCS#11 URI with an object ID whose length exceeds sizeof(opt_object_id) - this is the precise trigger confirmed by the patch diff adding the check 'if (opt_object_id_len > sizeof(opt_object_id))'. Passive user interaction (UI:P) is mandatory: the victim must actively run pkcs11-tool with attacker-influenced input; fully autonomous remote exploitation without any user participation is not supported by the CVSS vector. High attack complexity (AC:H) further constrains the attack, indicating that even with user interaction, reliable exploitation is non-trivial. Impact is strictly scoped to the pkcs11-tool process itself (no system or kernel compromise). Limiting factors: victim must be using pkcs11-tool interactively with a crafted URI; the object ID must exceed the fixed buffer threshold; no privilege escalation or scope change is achievable. Deployments where pkcs11-tool is used only with internally generated, trusted URIs are not exposed to this attack path.

Impact

The CVSS 4.0 score of 1.3 accurately reflects genuinely low real-world risk for this vulnerability. The attack vector is network (AV:N), indicating remote reachability, but high attack complexity (AC:H) and required passive user interaction (UI:P) sharply constrain autonomous exploitation - a fully hands-off remote attack is not supported by the CVSS vector. Impact is bounded to low-severity confidentiality, integrity, and availability effects on the vulnerable component (VC:L/VI:L/VA:L) with zero impact on subsequent system components (SC:N/SI:N/SA:N), ruling out privilege escalation or system-wide compromise. This vulnerability is not listed in CISA KEV, so no confirmed active exploitation exists. A public exploit has been published (referenced in the data), which elevates urgency slightly above a purely theoretical finding, but the combination of high complexity and user interaction requirements makes opportunistic mass exploitation implausible. EPSS score was not provided in the input data and cannot be stated. The tension between network attack vector and mandatory user interaction suggests the realistic attack path is social engineering a user to run pkcs11-tool with a crafted URI, not a direct network-injectable exploit. Overall, this is a low-priority patch-at-next-maintenance-window issue for most organizations.

Exploit ScenarioDerived

An attacker crafts a PKCS#11 URI with an object ID field that exceeds the length of the opt_object_id buffer in pkcs11-tool, then socially engineers a target user into running a pkcs11-tool key generation command (--keypairgen or equivalent) with that malicious URI as input. When the oversized object ID is processed by test_kpgen_certwrite without the now-patched length check, adjacent memory is overwritten, yielding low-severity corruption of confidentiality, integrity, or availability within the pkcs11-tool process. A public exploit has been published (referenced via an external link in the CVE data), though the high attack complexity and mandatory user interaction limit its practical utility for automated or mass exploitation.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 01, 2026

Buffer overflow in OpenSC's pkcs11-tool component (versions up to and including 0.26.1) exposes users of the key generation functionality to memory corruption when processing maliciously oversized PKCS#11 URI object IDs. An unauthenticated remote attacker can trigger the flaw in the test_kpgen_certwrite function, but exploitation requires passive user interaction and high attack complexity, reflected in the extremely low CVSS 4.0 score of 1.3 with impact limited to the vulnerable component only. Publicly available exploit code exists (E:P confirmed in CVSS vector), but no public exploit identified at time of analysis in CISA KEV, and real-world mass exploitation is significantly constrained by the required user participation and attack complexity.

RemediationAI

Apply upstream fix commit 814f745b3b6d100295f65f1935edd33d520d33ab, available at https://github.com/OpenSC/OpenSC/commit/814f745b3b6d100295f65f1935edd33d520d33ab, which adds explicit bounds validation - checking opt_object_id_len against sizeof(opt_object_id) - at two code points in pkcs11-tool.c. The fix is delivered via PR #3684 (https://github.com/OpenSC/OpenSC/pull/3684); a formal tagged release version incorporating this commit (e.g., 0.26.2 or later) has not been independently confirmed from the available data, so users should build from the patched commit or monitor the OpenSC release page for a new version. As a compensating control pending patching, restrict pkcs11-tool key generation operations to internally generated, trusted PKCS#11 URIs and prohibit passing user-supplied or externally sourced URI strings directly to pkcs11-tool - this eliminates the primary attack delivery path without disabling the tool entirely. Given the CVSS 4.0 score of 1.3 and the absence of KEV-confirmed exploitation, immediate emergency patching is not warranted for most environments.

Affected VersionsENISA

opensc 0.26.1
opensc 0.26.0

Affected Packages

euvd opensc no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

OpenSC is an open-source smart card framework and toolkit. The affected component is pkcs11-tool, a command-line utility for managing PKCS#11 cryptographic tokens. The root cause is a CWE-120 Classic Buffer Overflow: the function test_kpgen_certwrite in src/tools/pkcs11-tool.c copies data from a PKCS#11 URI's object ID field into the fixed-size opt_object_id buffer without first validating that opt_object_id_len does not exceed sizeof(opt_object_id). The PR diff for fix commit 814f745b confirms two missing bounds checks - one in main() during URI parsing and one inside test_kpgen_certwrite() itself - both of which were absent prior to the patch. When an oversized object ID is supplied, adjacent memory is corrupted, potentially affecting program state. The CPE identifier lists vendor as 'n/a' (cpe:2.3:a:n/a:opensc:*:*:*:*:*:*:*:*), which is a non-standard NVD artifact; the authoritative project is the OpenSC open-source project hosted at github.com/OpenSC/OpenSC.

Know when Opensc gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 1.3 LOW
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

Primary rating from Vendor (VulDB) · only source for this CVE.

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
Jun 01, 2026 - 17:22 NVD
MEDIUM LOW
CVSS changed
Jun 01, 2026 - 17:22 NVD
5.0 (MEDIUM) 1.3 (LOW)

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 80% exploitable
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +6
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

More in Opensc

View all
CVE-2019-6502 HIGH POC
7.5 Jan 22

sc_context_create in ctx.c in libopensc in OpenSC 0.19.0 has a memory leak, as demonstrated by a call from eidenv. Rated

CVE-2018-16393 MEDIUM POC
6.8 Sep 03

Several buffer overflows when handling responses from a Gemsafe V1 Smartcard in gemsafe_get_cert_len in libopensc/pkcs15

CVE-2018-16392 MEDIUM POC
6.8 Sep 03

Several buffer overflows when handling responses from a TCOS Card in tcos_select_file in libopensc/card-tcos.c in OpenSC

CVE-2018-16391 MEDIUM POC
6.8 Sep 03

Several buffer overflows when handling responses from a Muscle Card in muscle_list_files in libopensc/card-muscle.c in O

CVE-2018-16425 MEDIUM POC
6.6 Sep 04

A double free when handling responses from an HSM Card in sc_pkcs15emu_sc_hsm_init in libopensc/pkcs15-sc-hsm.c in OpenS

CVE-2018-16424 MEDIUM POC
6.6 Sep 04

A double free when handling responses in read_file in tools/egk-tool.c (aka the eGK card tool) in OpenSC before 0.19.0-r

CVE-2018-16423 MEDIUM POC
6.6 Sep 04

A double free when handling responses from a smartcard in sc_file_set_sec_attr in libopensc/sc.c in OpenSC before 0.19.0

CVE-2018-16422 MEDIUM POC
6.6 Sep 04

A single byte buffer overflow when handling responses from an esteid Card in sc_pkcs15emu_esteid_init in libopensc/pkcs1

CVE-2018-16421 MEDIUM POC
6.6 Sep 04

Several buffer overflows when handling responses from a CAC Card in cac_get_serial_nr_from_CUID in libopensc/card-cac.c

CVE-2018-16420 MEDIUM POC
6.6 Sep 04

Several buffer overflows when handling responses from an ePass 2003 Card in decrypt_response in libopensc/card-epass2003

CVE-2018-16419 MEDIUM POC
6.6 Sep 04

Several buffer overflows when handling responses from a Cryptoflex card in read_public_key in tools/cryptoflex-tool.c in

CVE-2018-16418 MEDIUM POC
6.6 Sep 04

A buffer overflow when handling string concatenation in util_acl_to_str in tools/util.c in OpenSC before 0.19.0-rc1 coul

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy