Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker crafts PKCS#11 URI with oversized object ID
-
DeliveryDeliver crafted URI to target user via social engineering
-
ExploitUser runs pkcs11-tool key generation with malicious URI
-
Executiontest_kpgen_certwrite copies object ID without bounds check
-
Persistopt_object_id buffer overflows into adjacent memory
-
ImpactLimited 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
Lifecycle Timeline
2DescriptionCVE.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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
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
Several buffer overflows when handling responses from a Gemsafe V1 Smartcard in gemsafe_get_cert_len in libopensc/pkcs15
Several buffer overflows when handling responses from a TCOS Card in tcos_select_file in libopensc/card-tcos.c in OpenSC
Several buffer overflows when handling responses from a Muscle Card in muscle_list_files in libopensc/card-muscle.c in O
A double free when handling responses from an HSM Card in sc_pkcs15emu_sc_hsm_init in libopensc/pkcs15-sc-hsm.c in OpenS
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
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
A single byte buffer overflow when handling responses from an esteid Card in sc_pkcs15emu_esteid_init in libopensc/pkcs1
Several buffer overflows when handling responses from a CAC Card in cac_get_serial_nr_from_CUID in libopensc/card-cac.c
Several buffer overflows when handling responses from an ePass 2003 Card in decrypt_response in libopensc/card-epass2003
Several buffer overflows when handling responses from a Cryptoflex card in read_public_key in tools/cryptoflex-tool.c in
A buffer overflow when handling string concatenation in util_acl_to_str in tools/util.c in OpenSC before 0.19.0-rc1 coul
EUVD-2026-33680
GHSA-c758-vvqj-x96q
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB