Out-of-bounds read in OpenSC - CVE-2025-66037
Published: April 2, 2026
Vulnerability details
The vulnerability allows an attacker with physical access to disclose sensitive information, modify data, or cause a denial of service.
The vulnerability exists due to out-of-bounds read in sc_pkcs15_pubkey_from_spki_fields() in the X.509/SPKI handling path when parsing malformed X.509 certificate or SPKI data via the PIV/PKCS#15 reader path. An attacker with physical access can feed specially crafted certificate data to trigger an out-of-bounds heap read and disclose sensitive information, modify data, or cause a denial of service.
The issue occurs when a zero-length buffer is allocated and one byte is read past the end of that allocation. It is reachable through the shared certificate and public-key decoding logic, including the fuzz_pkcs15_reader and fuzz_pkcs15_crypt harnesses, and was observed as undefined behavior in a non-sanitized build under Valgrind.
Affected software
SUSE Linux Enterprise Micro
SUSE Linux Enterprise Micro for Rancher
Anolis OS
openEuler
Fedora
opensc-debugsource
opensc-debuginfo
opensc
opensc-help
opensc-doc
opensc-libs
How to mitigate CVE-2025-66037
opensc-debugsource - update to 0.19.0-150100.3.34.1
opensc-debuginfo - update to 0.19.0-150100.3.34.1
opensc - update to 0.19.0-150100.3.34.1
opensc-help - update to 0.23.0-8
opensc-debugsource - update to 0.23.0-8
opensc-debuginfo - update to 0.23.0-8
opensc - update to 0.23.0-8
opensc-doc - update to 0.26.1-2
opensc-libs - update to 0.26.1-2
opensc - update to 0.26.1-2
opensc - addressed in versions 0.27.1-1.fc42, 0.27.1-1.fc43, 0.27.1-1.fc44