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 products
opensc_project: opensc
References3
- github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a2… Patch
- github.com/OpenSC/OpenSC/pull/3558 Issue TrackingPatch
- www.vulncheck.com/advisories/opensc-stack-buffer-overflow-via-p… Third Party Advisory
Metrics
- CVSS 3.1
-
6.8
MEDIUM
Score source: NVD
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 4.0
-
1.0
LOW
Score source: CNA
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 - EPSS — exploit probability
- 0% percentile: 22 · as of 15 November 2026
- CWE
- CWE-121
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.