Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | While the CVSS score of 3.9 appears low, the real-world risk is limited by the physical attack vector requiring direct smart card interface access (AV:P). The CVSS vector shows high attack complexity (AC:H) and no privilege escalation needed (PR:N). The tripartite impact (confidentiality, integrity, availability each scored as Low) reflects the out-of-bounds read's potential to leak heap memory, corrupt adjacent heap structures, or trigger application crashes. EPSS data is not provided, but exploitation requires both crafted PKCS#15 input AND physical device access, making opportunistic remote exploitation impossible. This is a real but constrained vulnerability affecting security-sensitive systems (smart card middleware) in localized threat models where physical access or insider threats are concerns. The availability of fuzzing input in the description suggests reproducibility, though no standalone POC package has been independently confirmed. |
| Exploit ScenarioDerived | An attacker with physical access to a smart card reader (e.g., a compromised kiosk, shared workstation, or insider with hardware access) inserts a crafted smart card or PKCS#15 container containing malicious X.509/SPKI fields. When the host system's OpenSC middleware processes the card, the sc_pkcs15_pubkey_from_spki_fields() function triggers the out-of-bounds read, leaking adjacent heap memory that may contain cryptographic keys, session tokens, or other sensitive data. Alternatively, the read may corrupt heap metadata, causing the OpenSC daemon or calling application to crash, resulting in denial of service. High attack complexity and physical access requirements limit this to insider threats or scenarios where attackers can control smart card content or supply chain. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 30, 2026
Out-of-bounds heap read in OpenSC prior to version 0.27.0 allows local attackers with physical access to smart card interfaces to trigger information disclosure and potential denial of service via crafted X.509/SPKI input to the pkcs15_reader function. The vulnerability stems from sc_pkcs15_pubkey_from_spki_fields() allocating a zero-length buffer and reading one byte beyond its bounds. No public exploit code or active exploitation has been identified; patch is available in version 0.27.0.
RemediationAI
Vendor-released patch: upgrade to OpenSC version 0.27.0 or later. Users should apply this update through their distribution's package manager (e.g., apt-get update && apt-get upgrade opensc on Debian/Ubuntu, or equivalent for other systems) or download directly from https://github.com/OpenSC/OpenSC/releases. No workarounds are documented; mitigation relies on eliminating physical access to untrusted smart card readers or restricting PKCS#15 input sources to trusted card providers only. Applications using embedded or vendored copies of OpenSC should coordinate patching with their dependency management workflows and test thoroughly with their existing smart card configurations before deployment.
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 open-source middleware for interacting with smart cards and cryptographic tokens. The vulnerability resides in X.509 Subject Public Key Information (SPKI) parsing within the PKCS#15 reader component. The root cause is a classic out-of-bounds read (CWE-125) in sc_pkcs15_pubkey_from_spki_fields(), which allocates a zero-length heap buffer and immediately performs a one-byte read operation beyond the allocation boundary. This occurs during processing of crafted smart card or PKCS#15 container inputs, typically through the fuzz_pkcs15_reader harness. The physical attack vector (AV:P in CVSS) indicates the attacker must have direct or logical access to the smart card interface, such as through a card reader device or local system access.
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
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, feeding a crafted input to the fuzz_pkcs15_reader harness causes OpenSC to perform an out-of-bounds heap read in the X.509/SPKI handling path. Specifically, sc_pkcs15_pubkey_from_spki_fields() allocates a zero-length buffer and then reads one byte past the end of that allocation. This issue has been patched in version 0.27.0.
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.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-2025-209126
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB