Stack-based Buffer Overflow Affecting opensc package, versions <0.22.0-150400.3.17.1


Severity

Recommended
0.0
high
0
10

Based on SUSE Linux Enterprise Server security rating.

Threat Intelligence

EPSS
0.19% (9th 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-SLES155-OPENSC-17614209
  • published27 Jun 2026
  • disclosed26 Jun 2026

Introduced: 26 Jun 2026

CVE-2026-40528  (opens in a new tab)
CWE-121  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade SLES:15.5 opensc to version 0.22.0-150400.3.17.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream opensc package and not the opensc package as distributed by SLES. See How to fix? for SLES:15.5 relevant fixed versions and status.

OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.

CVSS Base Scores

version 3.1