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

Summary

CVECVE-2026-40510
StatePUBLISHED
AssignerVulnCheck
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-05-29 14:16:26 UTC
Updated2026-05-29 14:16:26 UTC
DescriptionOpenSC 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.

Risk And Classification

Primary CVSS: v4.0 1 LOW from [email protected]

CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Problem Types: CWE-121 | CWE-121 Stack-based Buffer Overflow


VersionSourceTypeScoreSeverityVector
4.0[email protected]Secondary1LOWCVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/C...
4.0CNACVSS1LOWCVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
3.1[email protected]Primary3.8LOWCVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
3.1CNACVSS3.8LOWCVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

CVSS v4.0 Breakdown

Attack Vector
Physical
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Confidentiality
Low
Integrity
Low
Availability
Low
Sub Conf.
None
Sub Integrity
None
Sub Availability
None

CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

CVSS v3.1 Breakdown

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

CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA OpenSC OpenSC affected 0.27.0-rc1 semver Not specified
CNA OpenSC OpenSC affected 3f24f0b48a481a8cf2e46059d8238a283ddc1c13 git Not specified

References

ReferenceSourceLinkTags
www.vulncheck.com/advisories/opensc-stack-buffer-overflow-via-piv-process-histo... [email protected] www.vulncheck.com
github.com/OpenSC/OpenSC/pull/3558 [email protected] github.com
github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a283ddc1c13 [email protected] github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Nicholas Carlini of Anthropic (en)

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report