Skip to main content

Opensc CVE-2025-66037

| EUVDEUVD-2025-209126 LOW
Out-of-bounds Read (CWE-125)
2026-03-30 GitHub_M
3.9
CVSS 3.1 · GitHub Advisory
View

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.

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

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

Alert me

AnalysisAIv1 – 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

opensc < 0.27.0

Affected Packages

euvd opensc fix: 0.27.0

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

GitHub Advisory PRIMARY 3.9 LOW
AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Red Hat 3.9 LOW

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Physical
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

Lifecycle Timeline

2
Patch available
Apr 16, 2026 - 05:29 EUVD
0.27.0
CVE Published
Mar 30, 2026 - 17:01 nvd
LOW 3.9

DescriptionGitHub 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

EPSS Score
0.0%
Top 100% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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 No
EPSS 0.0%
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
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

20
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +20
PoC: 0
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.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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

Vendor StatusVendor

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