Skip to content
OpenAdvisories
Low · 3.9 CVE-2025-66038 EUVD-2025-209127

OpenSC: `sc_compacttlv_find_tag` can return out-of-bounds pointers

Published Mar 30, 2026 · Updated Apr 1, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
OpenSC OpenSC < 0.27.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 opensc 0.27.0~rc1-1 —
Debian 13 opensc No fix yet —
Debian 12 opensc No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 opensc No fix yet —
Ubuntu 26.04 LTS opensc No fix yet —
Ubuntu 25.10 opensc No fix yet —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS opensc No fix yet —
Ubuntu Pro 22.04 LTS opensc No fix yet —
Ubuntu Pro 20.04 LTS opensc No fix yet —
Ubuntu Pro 18.04 LTS opensc No fix yet —
Ubuntu Pro 16.04 LTS opensc No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES 15 SP6 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLES 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
Show 12 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 opensc 0.26.1-160000.3.1 SUSE-SU-2026:22126-1
SLES for SAP 15 SP6 opensc 0.22.0-150600.11.11.1 SUSE-SU-2026:2697-1
SLES for SAP 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLES for SAP 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLES 16.0 opensc 0.26.1-160000.3.1 SUSE-SU-2026:22126-1
SLE Micro 6.2 opensc 0.26.1-160000.3.1 SUSE-SU-2026:22114-1
SLE Micro 5.5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 5.4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 5.3 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE Micro 5.2 opensc 0.19.0-150100.3.34.1 SUSE-SU-2026:1477-1
SLE HPC 15 SP5 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
SLE HPC 15 SP4 opensc 0.22.0-150400.3.17.1 SUSE-SU-2026:2657-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed opensc 0.27.1-1.1 openSUSE-SU-2026:10475-1
openSUSE Leap 16.0 opensc 0.26.1-160000.3.1 openSUSE-SU-2026:20967-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 opensc No fix yet —

Advisories 8

References