# CVE-2026-40510: OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c

- Severity: Low 1.0 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 10% of CVEs (2026-11-30)
- Published: 2026-05-29T13:26:40.459Z
- Modified: 2026-11-08T14:02:53.357Z
- Weaknesses: CWE-121
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- OpenSC OpenSC: before 0.27.0-rc1; before 3f24f0b48a481a8cf2e46059d8238a283ddc1c13
- opensc_project opensc: before 0.27.0

## Every score

- VulnCheck: 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`
- VulnCheck: 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`
- NVD: 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`

## References

- <https://github.com/OpenSC/OpenSC/pull/3558> (issue-tracking, patch)
- <https://github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a283ddc1c13> (patch)
- <https://www.vulncheck.com/advisories/opensc-stack-buffer-overflow-via-piv-process-history-in-card-piv-c> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-40510](https://www.cve.org/CVERecord?id=CVE-2026-40510), CVE Terms of Use, modified 2026-11-08
- NVD: [CVE-2026-40510](https://nvd.nist.gov/vuln/detail/CVE-2026-40510), Public domain, modified 2026-07-21

---

Page: https://cve.day/CVE-2026-40510 · Whole record: https://cve.day/CVE-2026-40510.json · Rebuilt by cve.day 2026-11-25T22:59:23.311Z
