CVE-2026-40510
published 2026-05-29CVE-2026-40510: 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…
PriorityP432medium6.8CVSS 3.1
AVPACLPRNUINSUCHIHAH
EPSS
0.22%
12.0th percentile
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
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| opensc | opensc | < 0.27.0-rc1 | 0.27.0-rc1 |
| opensc | opensc | < 3f24f0b48a481a8cf2e46059d8238a283ddc1c13 | 3f24f0b48a481a8cf2e46059d8238a283ddc1c13 |
| opensc_project | opensc | < 0.27.0 | 0.27.0 |
| opensc_project | opensc | — | — |
CVSS provenance
nvdv3.16.8MEDIUMCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv4.01.0LOWCVSS: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
vendor_redhat6.8MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
opensc: OpenSC: Memory corruption via crafted PIV smart card
vendor_redhat·2026-05-29·CVSS 6.8
CVE-2026-40510 [MEDIUM] CWE-120 opensc: OpenSC: Memory corruption via crafted PIV smart card
opensc: OpenSC: Memory corruption via crafted PIV smart card
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.
A flaw was found in OpenSC. A physically present attacker can exploit a stack buffer overflow vulnerability in the `piv_process_history()` function by presenting a specially crafted Personal Identity Verification (PIV) smart card or USB device. This can lead to memory corruption within the system, potentially causing instability or unexpected behavior.
Package: opensc (Red
GHSA
GHSA-7rrw-cv3r-3cgg: OpenSC before 0
ghsa_unreviewed·2026-05-29
CVE-2026-40510 [LOW] CWE-121 GHSA-7rrw-cv3r-3cgg: OpenSC before 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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card [fedora-all]
bugzilla·2026-06-18·CVSS 6.8
CVE-2026-40510 [MEDIUM] CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card [fedora-all]
CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
Bugzilla
CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card
bugzilla·2026-05-29·CVSS 6.8
CVE-2026-40510 [MEDIUM] CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card
CVE-2026-40510 opensc: OpenSC: Memory corruption via crafted PIV smart card
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.
2026-05-29
Published