Skip to content

CVE-2026-40528 OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c

LowCVSS 1.0 EPSS 0.19%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
Red Hat

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.

Upgrade path

7 packages: 2 fixed, 5 with no fix yet.

PackageAffectedFixed inStatus
azure linux opensc(Azure Linux 3.0) All versions No fix listed No fix yet
redhat/opensc(Red Hat enterprise_linux 10) All versions No fix listed No fix yet
redhat/opensc(Red Hat enterprise_linux 8) All versions No fix listed No fix yet
redhat/opensc(Red Hat enterprise_linux 9) All versions No fix listed No fix yet
redhat/opensc(Red Hat rhel_els 7) All versions No fix listed No fix yet
opensc < 0.27.0; < 0358817ec74aeca654f83e7709c7720b14c5db59 0.27.0, 0358817ec74aeca654f83e7709c7720b14c5db59 Fixed
opensc project opensc < 0.27.0 0.27.0 Fixed

Affected products

ProductAffected versionsFixed in
opensc < 0.27.0 0.27.0
opensc < 0358817ec74aeca654f83e7709c7720b14c5db59 0358817ec74aeca654f83e7709c7720b14c5db59
redhat/opensc(Red Hat:enterprise_linux:10) All versions No fix listed
redhat/opensc(Red Hat:rhel_els:7) All versions No fix listed
redhat/opensc(Red Hat:enterprise_linux:8) All versions No fix listed
redhat/opensc(Red Hat:enterprise_linux:9) All versions No fix listed
opensc project opensc < 0.27.0 0.27.0
azure linux opensc(Azure Linux:3.0) All versions No fix listed

References