OpenSC up to 0.27.0 PIV src/libopensc/card-piv.c piv_process_history stack-based overflow

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
4.8$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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

Productinfo

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒

CVSSv3info

VulDB Meta Base Score: 4.8
VulDB 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): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Stack-based overflow
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 321650
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-40510

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: OpenSC 0.27.0-rc1
Patch: 3f24f0b48a481a8cf2e46059d8238a283ddc1c13

Timelineinfo

04/13/2026 CVE reserved
05/29/2026 +46 days Advisory disclosed
05/29/2026 +0 days VulDB entry created
06/20/2026 +22 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: 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

Entryinfo

Created: 05/29/2026 17:37
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!