Skip to content
OpenAdvisories
Low · 3.8 CVE-2026-40510 EUVD-2026-33315GHSA-7rrw-cv3r-3cgg

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

Published May 29, 2026 · Updated Nov 8, 2026 · Assigned by VulnCheck

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

VendorProductAffectedFixed
OpenSC OpenSC < 0.27.0-rc1 0.27.0-rc1

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP7 opensc 0.22.0-150600.11.14.1 SUSE-SU-2026:4123-1
SLES 12 SP5 opensc 0.13.0-3.39.1 SUSE-SU-2026:4108-1
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 opensc 0.26.1-160000.4.1 SUSE-SU-2026:23717-1, SUSE-SU-2026:23697-1
SLES 16.0 opensc 0.26.1-160000.4.1 SUSE-SU-2026:23717-1, SUSE-SU-2026:23697-1
SLE Micro 6.2 opensc 0.26.1-160000.4.1 SUSE-SU-2026:23543-1
SLE Micro 6.1 opensc 0.24.0-slfo.1.1_5.1 SUSE-SU-2026:23527-1
SLE Micro 6.0 opensc 0.24.0-7.1 SUSE-SU-2026:23478-1
SLE Micro 5.5 opensc 0.22.0-150400.3.20.1 SUSE-SU-2026:4122-1
SLE Micro 5.4 opensc 0.22.0-150400.3.20.1 SUSE-SU-2026:4122-1
SLE Micro 5.3 opensc 0.22.0-150400.3.20.1 SUSE-SU-2026:4122-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 opensc 0.26.1-160000.4.1 openSUSE-SU-2026:21820-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 opensc 0.27.0-rc1 —

Advisories 12

References