CVE-2025-66038
CVE-2025-66038 is a low-severity vulnerability in Opensc Project Opensc with a CVSS 3.x base score of 3.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-126.
Key facts
- Severity: Low (CVSS 3.x base score 3.9)
- EPSS exploit prediction: 0% (20th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2025-209127
- Weakness: CWE-126
- Affected product: Opensc Project Opensc
- Published:
- Last modified:
Description
OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, sc_compacttlv_find_tag searches a compact-TLV buffer for a given tag. In compact-TLV, a single byte encodes the tag (high nibble) and value length (low nibble). With a 1-byte buffer {0x0A}, the encoded element claims tag=0 and length=10 but no value bytes follow. Calling sc_compacttlv_find_tag with search tag 0x00 returns a pointer equal to buf+1 and outlen=10 without verifying that the claimed value length fits within the remaining buffer. In cases where the sc_compacttlv_find_tag is provided untrusted data (such as being read from cards/files), attackers may be able to influence it to return out-of-bounds pointers leading to downstream memory corruption when subsequent code tries to dereference the pointer. This issue has been patched in version 0.27.0.
Frequently asked questions
- What is CVE-2025-66038?
- OpenSC is an open source smart card tools and middleware. Prior to version 0.27.0, sc_compacttlv_find_tag searches a compact-TLV buffer for a given tag. In compact-TLV, a single byte encodes the tag (high nibble) and value length (low nibble). With a 1-byte buffer {0x0A}, the encoded element claims tag=0 and length=10 but no value bytes follow. Calling sc_compacttlv_find_tag with search tag 0x00 returns a pointer equal to buf+1 and outlen=10 without verifying that the claimed value length fits within the remaining buffer. In cases where the sc_compacttlv_find_tag is provided untrusted data (such as being read from cards/files), attackers may be able to influence it to return out-of-bounds pointers leading to downstream memory corruption when subsequent code tries to dereference the pointer. This issue has been patched in version 0.27.0.
- How severe is CVE-2025-66038?
- CVE-2025-66038 has a CVSS 3.x base score of 3.9, rated low severity. It is exploitable over physical access with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is low, integrity low, and availability low.
- Is CVE-2025-66038 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (20th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2025-66038?
- CVE-2025-66038 affects Opensc Project Opensc. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2025-66038?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- Does CVE-2025-66038 have an EU (EUVD) identifier?
- Yes. CVE-2025-66038 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-209127.
- When was CVE-2025-66038 published?
- CVE-2025-66038 was published on 2026-03-30 and last updated on 2026-06-17.
References
- https://github.com/OpenSC/OpenSC/commit/6db171bcb6fd7cb3b51098fefbb3b28e44f0a79c
- https://github.com/OpenSC/OpenSC/security/advisories/GHSA-72x5-fwjx-2459
- https://github.com/OpenSC/OpenSC/wiki/CVE-2025-66038
Affected products (1)
- cpe:2.3:a:opensc_project:opensc:*:*:*:*:*:*:*:*
More vulnerabilities in Opensc Project Opensc
- CVE-2021-34193 — High (CVSS 7.5): Stack overflow vulnerability in OpenSC smart card middleware before 0.23 via crafted responses to APDUs.
- CVE-2019-16058 — High (CVSS 7.5): An issue was discovered in the pam_p11 component 0.2.0 and 0.3.0 for OpenSC. If a smart card creates a signature with a…
- CVE-2019-6502 — High (CVSS 7.5): sc_context_create in ctx.c in libopensc in OpenSC 0.19.0 has a memory leak, as demonstrated by a call from eidenv.
- CVE-2023-2977 — High (CVSS 7.1): A vulnerbility was found in OpenSC. This security flaw cause a buffer overrun vulnerability in pkcs15…
- CVE-2019-20792 — Medium (CVSS 6.8): OpenSC before 0.20.0 has a double free in coolkey_free_private_data because coolkey_add_object in…
- CVE-2018-16393 — Medium (CVSS 6.8): Several buffer overflows when handling responses from a Gemsafe V1 Smartcard in gemsafe_get_cert_len in…
All CVEs affecting Opensc Project Opensc →
Other CWE-126 (Buffer Over-read) vulnerabilities
- CVE-2026-41898 — Critical (CVSS 9.8): rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.24 to before 0.10.78, the FFI…
- CVE-2023-36397 — Critical (CVSS 9.8): Windows Pragmatic General Multicast (PGM) Remote Code Execution Vulnerability
- CVE-2025-12106 — Critical (CVSS 9.1): Insufficient argument validation in OpenVPN 2.7_alpha1 through 2.7_rc1 allows an attacker to trigger a heap buffer…
- CVE-2023-51773 — Critical (CVSS 9.1): BACnet Stack before 1.3.2 has a decode function APDU buffer over-read in bacapp_decode_application_data in bacapp.c.
- CVE-2021-34584 — Critical (CVSS 9.1): Crafted web server requests can be utilised to read partial stack or heap memory or may trigger a denial-of- service…
- CVE-2025-36855 — High (CVSS 8.8): A vulnerability ( CVE-2025-21176 https://www.cve.org/CVERecord ) exists in DiaSymReader.dll due to buffer over-read.…