CVE-2026-40510 OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c
A stack buffer overflow in OpenSC allows physically present attackers to execute arbitrary code via a crafted PIV smart card.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-40510?
CVE-2026-40510 is a low-severity memory corruption vulnerability in Opensc Project Opensc, published on 29 May 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-121
Which versions are affected by CVE-2026-40510?
It affects 1 product.
Linux distribution packages (13)
opensc SUSE:Linux Enterprise Micro 5.3 | All versions | 0.22.0-150400.3.20.1 |
opensc SUSE:Linux Enterprise Micro 5.4 | All versions | 0.22.0-150400.3.20.1 |
opensc SUSE:Linux Enterprise Micro 5.5 | All versions | 0.22.0-150400.3.20.1 |
opensc SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 0.22.0-150600.11.14.1 |
opensc SUSE:Linux Enterprise Server 16.0 | All versions | 0.26.1-160000.4.1 |
opensc SUSE:Linux Enterprise Server 16.0 | All versions | 0.26.1-160000.4.1 |
opensc SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 0.13.0-3.39.1 |
opensc SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.26.1-160000.4.1 |
opensc SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 0.26.1-160000.4.1 |
opensc SUSE:Linux Micro 6.0 | All versions | 0.24.0-7.1 |
opensc SUSE:Linux Micro 6.1 | All versions | 0.24.0-slfo.1.1_5.1 |
opensc SUSE:Linux Micro 6.2 | All versions | 0.26.1-160000.4.1 |
opensc openSUSE:Leap 16.0 | All versions | 0.26.1-160000.4.1 |
Products include Opensc Project Opensc.
How do I fix CVE-2026-40510?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-40510 being exploited?
There is no known exploitation of CVE-2026-40510 in the wild and no public exploit code.
Other vulnerabilities in Opensc Project Opensc
Sources
Also known as AZL-89150, CLSA-2026-1781267272, GHSA-7rrw-cv3r-3cgg, SUSE-SU-2026:23478-1, SUSE-SU-2026:23527-1, SUSE-SU-2026:23543-1 and 6 more.