CVE-2026-40510

OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c

MEDIUM
6.8
CVSS Score
Published: May 29, 2026 at 01:26 PM UTC
Updated: July 21, 2026 at 01:39 PM UTC
1 product affected across 1 vendorOpenSC

Using OpenSC by OpenSC?

Get instant alerts when new vulnerabilities affect OpenSC - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.8
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.27.0v < 0.27.0-rc1
Affected range stops below 0.27.0, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.27.0-rc1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
PHYSICAL
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-121

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card