Every CVE Search/ Get API key

CVE-2026-40510

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

1.0 LowFix available

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

0.29%Up 0.3 points since May 30, 2026
90%50%10%1%

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 LowCVSS: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 LowCVSS: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 LowCVSS: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 LowCVSS: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 LowCVSS: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 LowCVSS: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 LowCVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
CVSS 3.1
6.8 MediumCVSS: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 LowCVSS: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

Affected packages
PackageAffectedFixed
opensc
Azure Linux:3
before 0.27.0-rc1
0.27.0-rc1
opensc
TuxCare: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
opensc
TuxCare:AlmaLinux:9.6
before 0.23.0-5.el9.tuxcare.els5
0.23.0-5.el9.tuxcare.els5
opensc
SUSE:Linux Micro 6.0
before 0.24.0-7.1
0.24.0-7.1
opensc
SUSE:Linux Micro 6.1
before 0.24.0-slfo.1.1_5.1
0.24.0-slfo.1.1_5.1
opensc
SUSE:Linux Micro 6.2
before 0.26.1-160000.4.1
0.26.1-160000.4.1
opensc
SUSE:Linux Enterprise Server 16.0
before 0.26.1-160000.4.1
0.26.1-160000.4.1
opensc
SUSE:Linux Enterprise Server for SAP applications 16.0
before 0.26.1-160000.4.1
0.26.1-160000.4.1
opensc
SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5
before 0.13.0-3.39.1
0.13.0-3.39.1
opensc
SUSE:Linux Enterprise Micro 5.3
before 0.22.0-150400.3.20.1
0.22.0-150400.3.20.1
Show 4 moreShow less
Affected packages
PackageAffectedFixed
opensc
SUSE:Linux Enterprise Micro 5.4
before 0.22.0-150400.3.20.1
0.22.0-150400.3.20.1
opensc
SUSE:Linux Enterprise Micro 5.5
before 0.22.0-150400.3.20.1
0.22.0-150400.3.20.1
opensc
SUSE:Linux Enterprise Module for Basesystem 15 SP7
before 0.22.0-150600.11.14.1
0.22.0-150600.11.14.1
opensc
openSUSE:Leap 16.0
before 0.26.1-160000.4.1
0.26.1-160000.4.1

History

History
RecordedChangedSources
affected
factsOSV
first indexedCVE 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

Show 14 moreShow less
MoveEnter Open