#VU124852 Out-of-bounds read in OpenSC - CVE-2025-66037
Published: April 2, 2026
OpenSC
OpenSC
Description
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.