CVE-2025-66038
OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · March 31, 2026
Updated · June 30, 2026
Description
A flaw was found in OpenSC, an open-source smart card tools and middleware. The sc_compacttlv_find_tag function, which searches compact-TLV (Tag-Length-Value) buffers, does not adequately verify the claimed value length against the remaining buffer size. This vulnerability allows attackers to provide specially crafted untrusted data, such as from smart cards or files, to influence the function to return pointers outside of the intended memory boundaries. Subsequent attempts to dereference these out-of-bounds pointers can lead to memory corruption, potentially impacting the stability and integrity of the system.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 3.9CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
CWE-805 · Buffer Access with Incorrect Length Value