CVE-2026-40510
OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c
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.
Attack profile
How easy it is to exploit
- Attack vector
- Physical
- Complexity
- High
- Privileges needed
- None
- User interaction
- Passive
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
1.0
OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c
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.
- Record
CVE-2026-40510- CVSS 4.0
- 1.0 Low
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 - CVSS 3.1
- 3.8 Low
CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-121
- Updated
- 2026-11-02
EUVDEUVD-2026-33315
1.0
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.
- Record
EUVD-2026-33315- CVSS 4.0
- 1.0 Low
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-7rrw-cv3r-3cgg
1.0
OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability...
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.
- Record
GHSA-7rrw-cv3r-3cgg- CVSS 4.0
- 1.0 Low
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 3.1
- 3.8 Low
CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - Weakness
- CWE-121
- Updated
- 2026-11-02
NVD
1.0
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.
- Record
CVE-2026-40510- CVSS 4.0
- 1.0 Low
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 3.1
- 3.8 Low
CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L - CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-121
- Updated
- 2026-11-02
OSV
1.0
OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c
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.
- Record
CVE-2026-40510- CVSS 4.0
- 1.0 Low
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 - Weakness
- CWE-121
- Updated
- 2026-11-02
OSVAZL-89150 No score
CVE-2026-40510 affecting package opensc for versions less than 0.27.0-rc1
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.
- Record
AZL-89150- Updated
- 2026-11-05
Show 11 moreShow less
OSVCLSA-2026-1780711381 No score
opensc: Fix of 2 CVEs
- CVE-2026-40510: stack buffer overflow in piv_process_history() via crafted PIV Key History Object
- CVE-2026-40528: stack/heap buffer overrun in do_key_value() via overlong pkcs15init profile key value
- Record
CLSA-2026-1780711381- Updated
- 2026-11-02
OSVCLSA-2026-1781267272 No score
opensc: Fix of CVE-2026-40510
- CVE-2026-40510: fix possible stack buffer overflow when handling PIV history object
- Record
CLSA-2026-1781267272- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:21820-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
openSUSE-SU-2026:21820-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23478-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:23478-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23527-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:23527-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23543-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:23543-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23697-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:23697-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:23717-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:23717-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:4108-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:4108-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:4122-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:4122-1- Updated
- 2026-11-02
OSVSUSE-SU-2026:4123-1 No score
Security update for opensc
This update for opensc fixes the following issue:
- CVE-2026-40510: stack buffer overflow in
piv_process_history()allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device (bsc#1266964).
- Record
SUSE-SU-2026:4123-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
openscAzure Linux:3 |
before 0.27.0-rc1 | 0.27.0-rc1 |
openscTuxCare:AlmaLinux:9.2 From an advisory covering 2 CVEs |
before 0.22.0-2.el9_2.tuxcare.els8 | 0.22.0-2.el9_2.tuxcare.els8 |
openscTuxCare:AlmaLinux:9.6 |
before 0.23.0-5.el9.tuxcare.els5 | 0.23.0-5.el9.tuxcare.els5 |
openscSUSE:Linux Micro 6.0 |
before 0.24.0-7.1 | 0.24.0-7.1 |
openscSUSE:Linux Micro 6.1 |
before 0.24.0-slfo.1.1_5.1 | 0.24.0-slfo.1.1_5.1 |
openscSUSE:Linux Micro 6.2 |
before 0.26.1-160000.4.1 | 0.26.1-160000.4.1 |
openscSUSE:Linux Enterprise Server 16.0 |
before 0.26.1-160000.4.1 | 0.26.1-160000.4.1 |
openscSUSE:Linux Enterprise Server for SAP applications 16.0 |
before 0.26.1-160000.4.1 | 0.26.1-160000.4.1 |
openscSUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 |
before 0.13.0-3.39.1 | 0.13.0-3.39.1 |
openscSUSE:Linux Enterprise Micro 5.3 |
before 0.22.0-150400.3.20.1 | 0.22.0-150400.3.20.1 |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
openscSUSE:Linux Enterprise Micro 5.4 |
before 0.22.0-150400.3.20.1 | 0.22.0-150400.3.20.1 |
openscSUSE:Linux Enterprise Micro 5.5 |
before 0.22.0-150400.3.20.1 | 0.22.0-150400.3.20.1 |
openscSUSE:Linux Enterprise Module for Basesystem 15 SP7 |
before 0.22.0-150600.11.14.1 | 0.22.0-150600.11.14.1 |
openscopenSUSE:Leap 16.0 |
before 0.26.1-160000.4.1 | 0.26.1-160000.4.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-40510 is a low vulnerability (CVSS 1.0) in Opensc, published May 29, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.29%, the 22nd percentile. Fixed in opensc 0.27.0-rc1.
References
github.com/OpenSC/OpenSC/pull/3558
github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a283ddc1c13
vulncheck.com/advisories/opensc-stack-buffer-overflow-via-piv-process-history-in-card-piv-c
nvd.nist.gov/vuln/detail/CVE-2026-40510
github.com/advisories/GHSA-7rrw-cv3r-3cgg
errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2026-1780711381.html
Show 14 moreShow less
nvd.nist.gov/vuln/detail/CVE-2026-40528
errata.tuxcare.com/els_os/tuxcare9.6esu/CLSA-2026-1781267272.html
github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40510.json
github.com/OpenSC/OpenSC
suse.com/support/update/announcement/2026/suse-su-202623478-1
bugzilla.suse.com/1266964
suse.com/security/cve/CVE-2026-40510
suse.com/support/update/announcement/2026/suse-su-202623527-1
suse.com/support/update/announcement/2026/suse-su-202623543-1
suse.com/support/update/announcement/2026/suse-su-202623697-1
suse.com/support/update/announcement/2026/suse-su-202623717-1
suse.com/support/update/announcement/2026/suse-su-20264108-1
suse.com/support/update/announcement/2026/suse-su-20264122-1
suse.com/support/update/announcement/2026/suse-su-20264123-1