CVE-2025-66038
published 2026-03-30CVE-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…
PriorityP430medium6.8CVSS 3.1
AVPACLPRNUINSUCHIHAH
EPSS
0.28%
20.4th percentile
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.
Affected
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | opensc | < opensc 0.27.0~rc1-1 (forky) | opensc 0.27.0~rc1-1 (forky) |
| opensc | opensc | < 0.27.0 | 0.27.0 |
| opensc_project | opensc | < 0.27.0 | 0.27.0 |
| opensc_project | opensc | >= 0 < 0.27.0~rc1-1 | 0.27.0~rc1-1 |
CVSS provenance
nvdv3.16.8MEDIUMCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
osv6.8MEDIUM
vendor_debian3.9LOW
vendor_redhat3.9LOW
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
CVE-2025-66038: OpenSC is an open source smart card tools and middleware
osv·2026-03-30·CVSS 6.8
CVE-2025-66038 [MEDIUM] CVE-2025-66038: OpenSC is an open source smart card tools and middleware
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
Red Hat
OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
vendor_redhat·2026-03-30·CVSS 3.9
CVE-2025-66038 [LOW] CWE-805 OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
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 down
Debian
CVE-2025-66038: opensc - OpenSC is an open source smart card tools and middleware. Prior to version 0.27....
vendor_debian·2025·CVSS 3.9
CVE-2025-66038 [LOW] CVE-2025-66038: opensc - OpenSC is an open source smart card tools and middleware. Prior to version 0.27....
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
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2025-66038 OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
bugzilla·2026-03-30·CVSS 6.8
CVE-2025-66038 [MEDIUM] CVE-2025-66038 OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
CVE-2025-66038 OpenSC: OpenSC: Memory corruption via improper compact-TLV length validation
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
Bugzilla
CVE-2025-66038 opensc: OpenSC: Memory corruption via improper compact-TLV length validation [fedora-all]
bugzilla·2026-03-30·CVSS 3.9
CVE-2025-66038 [LOW] CVE-2025-66038 opensc: OpenSC: Memory corruption via improper compact-TLV length validation [fedora-all]
CVE-2025-66038 opensc: OpenSC: Memory corruption via improper compact-TLV length validation [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
Discussion:
FEDORA-2026-8c5856afbb (opensc-0.27.1-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-8c5856afbb
---
FEDORA-2026-4440b00e25 (opensc-0.27.1-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-4440b00e25
---
FEDORA-2026-4440b00e25 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the followi
Wiz
CVE-2025-66038 Impact, Exploitability, and Mitigation Steps | Wiz
blogs_wiz·CVSS 3.9
CVE-2025-66038 [LOW] CVE-2025-66038 Impact, Exploitability, and Mitigation Steps | Wiz
## CVE-2025-66038 :
NixOS vulnerability analysis and mitigation
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 memor
2026-03-30
Published