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

Published May 29, 2026
·
Updated

OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in pivprocesshistory() 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 Software

3 affected components
OpenSC OpenSC<0.27.0-rc1
Opensc Project Opensc<0.27.0
Microsoft azl3 opensc 0.27.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade opensc to a version that resolves this vulnerability.

    Fixed in 0.27.0-rc1Patch 3f24f0b
  2. Compensating control

    Mitigate physically present exploitation by preventing/controlling access to the system’s smart-card/USB interfaces used for PIV cards (limit who can present a crafted PIV smart card/USB device).

Event History

May 29, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 31, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-40510?

The severity of CVE-2026-40510 is rated as low with a score of 3.8.

2

How do I fix CVE-2026-40510?

To fix CVE-2026-40510, update OpenSC to version 0.27.0-rc1 or later.

3

What is the impact of CVE-2026-40510?

CVE-2026-40510 allows physical attackers to trigger memory corruption by using a crafted PIV smart card or USB device.

4

What type of vulnerability is CVE-2026-40510?

CVE-2026-40510 is classified as a stack buffer overflow vulnerability.

5

How can a physical attacker exploit CVE-2026-40510?

A physical attacker can exploit CVE-2026-40510 by presenting a specially crafted PIV smart card that triggers the buffer overflow.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2026-40510 - OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c - SecAlerts