{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-66038","id":"CVE-2025-66038","title":"OpenSC: `sc_compacttlv_find_tag` can return out-of-bounds pointers","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 r","descriptionLong":"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.","published":"2026-03-30T17:03:55.914Z","updated":"2026-10-28T11:06:14.289778757Z","reserved":"2025-11-21T01:08:02.615Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"low","source":"GitHub_M"},"metrics":[{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"low","source":"GitHub_M"},{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"low","source":"github.com"},{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":3.9,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","rating":"low","source":"OSV"}],"rating":"low","products":["OpenSC"],"affectedProducts":[{"vendor":"OpenSC","product":"OpenSC","defaultStatus":null,"versions":[{"version":"< 0.27.0","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-126"],"aliases":["GHSA-72x5-fwjx-2459"],"references":[{"url":"https://github.com/OpenSC/OpenSC/security/advisories/GHSA-72x5-fwjx-2459","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory"]},{"url":"https://github.com/OpenSC/OpenSC/commit/6db171bcb6fd7cb3b51098fefbb3b28e44f0a79c","tags":["x_refsource_MISC","Patch","fix"]},{"url":"https://github.com/OpenSC/OpenSC/wiki/CVE-2025-66038","tags":["x_refsource_MISC","Vendor Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66038.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66038","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00299,"epssPercentile":0.23084,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-66038","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66038","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-66038","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-66038","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}