#VU124852 Out-of-bounds read in OpenSC - CVE-2025-66037

 

#VU124852 Out-of-bounds read in OpenSC - CVE-2025-66037

Published: April 2, 2026


Vulnerability identifier: #VU124852
Vulnerability risk: Low
CVSSv4.0: CVSS:4.0/AV:P/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2025-66037
CWE-ID: CWE-125
Exploitation vector: Local access
Exploit availability: No public exploit available
Vulnerable software:
OpenSC
Software vendor:
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.


Remediation

Install security update from vendor's website.

External links