OpenSC up to 0.27.0 PIV src/libopensc/card-piv.c piv_process_history stack-based overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 4.8 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as critical has been discovered in OpenSC. The impacted element is the function piv_process_history in the library src/libopensc/card-piv.c of the component PIV Handler. The manipulation results in stack-based overflow.
This vulnerability is reported as CVE-2026-40510. An attack on the physical device is feasible. No exploit exists.
It is advisable to upgrade the affected component.
Details
A vulnerability was found in OpenSC. It has been classified as problematic. Affected is the function piv_process_history in the library src/libopensc/card-piv.c of the component PIV Handler. The manipulation with an unknown input leads to a stack-based overflow vulnerability. CWE is classifying the issue as CWE-121. A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:
OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in piv_process_history() in src/libopensc/card-piv.c that allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device returning a URL field longer than 118 bytes in the Key History Object ASN.1 response.
The weakness was disclosed by Nicholas Carlini. The advisory is available at github.com. This vulnerability is traded as CVE-2026-40510 since 04/13/2026. The exploitability is told to be difficult. Local access is required to approach this attack. The exploitation doesn't require any form of authentication. Technical details are known, but there is no available exploit.
The vulnerability scanner Nessus provides a plugin with the ID 321650 (Linux Distros Unpatched Vulnerability : CVE-2026-40510), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 0.27.0-rc1 eliminates this vulnerability. Applying the patch 3f24f0b48a481a8cf2e46059d8238a283ddc1c13 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (321650) and CERT Bund (WID-SEC-2026-1755). If you want to get best quality of vulnerability data, you may have to visit VulDB.
Affected
- Open Source OpenSC
Product
Name
Version
- 0.2.0
- 0.3.2
- 0.3.5
- 0.4.0
- 0.5.0
- 0.6.0
- 0.6.1
- 0.7.0
- 0.8
- 0.8.0
- 0.8.0.0
- 0.8.1
- 0.9
- 0.9.2
- 0.9.3
- 0.9.4
- 0.9.5
- 0.9.6
- 0.9.7
- 0.9.8
- 0.10.0
- 0.10.1
- 0.11.0
- 0.11.1
- 0.11.2
- 0.11.3
- 0.11.4
- 0.11.5
- 0.11.6
- 0.11.7
- 0.11.8
- 0.11.9
- 0.11.10
- 0.11.11
- 0.11.12
- 0.11.13
- 0.19.0
- 0.19.0-rc1
- 0.20.0
- 0.20.0-rc1
- 0.20.0-rc3
- 0.21.0-rc1
- 0.22.0
- 0.23
- 0.24.0
- 0.24.0-rc1
- 0.27.0
License
Website
- Product: https://github.com/OpenSC/OpenSC/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 4.8VulDB Meta Temp Score: 4.8
VulDB Base Score: 3.9
VulDB Temp Score: 3.8
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 6.8
NVD Vector: 🔒
CNA Base Score: 3.8
CNA Vector (VulnCheck): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Stack-based overflowCWE: CWE-121 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: Yes
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 321650
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-40510
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: OpenSC 0.27.0-rc1
Patch: 3f24f0b48a481a8cf2e46059d8238a283ddc1c13
Timeline
04/13/2026 CVE reserved05/29/2026 Advisory disclosed
05/29/2026 VulDB entry created
06/20/2026 VulDB entry last update
Sources
Product: github.comAdvisory: github.com
Researcher: Nicholas Carlini
Status: Confirmed
CVE: CVE-2026-40510 (🔒)
GCVE (CVE): GCVE-0-2026-40510
GCVE (VulDB): GCVE-100-367242
CERT Bund: WID-SEC-2026-1755 - OpenSC: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff
Entry
Created: 05/29/2026 17:37Updated: 06/20/2026 15:27
Changes: 05/29/2026 17:37 (80), 06/02/2026 06:39 (7), 06/07/2026 05:29 (11), 06/20/2026 15:27 (2)
Complete: 🔍
Cache ID: 216::103
If you want to get best quality of vulnerability data, you may have to visit VulDB.
No comments yet. Languages: en.
Please log in to comment.