Buffer Overflow Affecting opensc/opensc package, versions [,0.27.0-rc1)


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-OPENSCOPENSC-17429027
  • published23 Jun 2026
  • disclosed29 May 2026
  • creditNicholas Carlini

Introduced: 29 May 2026

CVE-2026-40510  (opens in a new tab)
CWE-120  (opens in a new tab)

How to fix?

Upgrade opensc/opensc to version 0.27.0-rc1 or higher.

Overview

Affected versions of this package are vulnerable to Buffer Overflow via the piv_process_history function. An attacker can cause memory corruption and potentially execute arbitrary code or disrupt system stability by presenting a specially crafted Personal Identity Verification (PIV) smart card or USB device that returns a URL field longer than expected in the Key History Object ASN.1 response. This is only exploitable if the attacker has physical access to the system.

CVSS Base Scores

version 4.0
version 3.1