Skip to content
OpenAdvisories
Low · 3.8 CVE-2026-40528 EUVD-2026-33320GHSA-vxjj-52h8-95w5

OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c

Published May 29, 2026 · Updated Jul 14, 2026 · Assigned by VulnCheck

Description

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.

Affected products

VendorProductAffectedFixed
OpenSC OpenSC < 0.27.0 0.27.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP7 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES 15 SP6 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLES 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP6 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES for SAP 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLES for SAP 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 6.1 opensc 0.24.0-slfo.1.1_4.1 SUSE-SU-2026:22139-1
SLE Micro 6.0 opensc 0.24.0-6.1 SUSE-SU-2026:22103-1
SLE Micro 5.5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 5.4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 5.3 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE HPC 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE HPC 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed opensc 0.27.1-2.1 openSUSE-SU-2026:11022-1
openSUSE Leap 16.0 opensc 0.26.1-160000.5.1 openSUSE-SU-2026:21873-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 opensc 0.24.0-1.amzn2023.0.6 ALAS2023-2026-1988
Amazon Linux 2 opensc 0.19.0-6.amzn2.0.4 ALAS2-2026-3824

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 opensc 0.27.0-1 —

Advisories 9

References