CVE-2024-45616
Low · 3.9CVSS
3.9
EPSS
0.4%
Published
Sep 3, 2024
CISA due date
—
Cloudanix analysis
A flaw in software that talks to smart cards lets an attacker with physical access to a plugged-in card potentially cause memory problems that could expose or damage information on the computer.
- Exploitation
- Physical Access
- Attacker needs
- Physical Access
- Complexity
- High
- Impact
- Data Exposure
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Insufficient bounds checking on APDU response buffers returned by smart cards or USB tokens allows memory corruption in the OpenSC PKCS#11 module, minidriver, and related tools when processing crafted card responses.
Why it matters to the business
Organizations relying on smart-card or hardware-token authentication face risk of local memory corruption that could lead to credential theft or system instability when an attacker gains physical access to insert a malicious card or device.
How an attack unfolds
An attacker with physical access prepares a USB device or smart card that returns specially crafted APDU responses; when OpenSC sends APDUs and receives the malicious replies, the lack of proper buffer-length validation triggers memory corruption that an attacker can leverage for limited read/write or denial-of-service effects.
How to fix it
Upgrade OpenSC to the commit fe857cc4c68da4873071f168c9aaf9860040ff4e or later; rebuild and redeploy all dependent PKCS#11 modules, minidrivers, and CTK components; verify that the updated libraries are loaded by applications using smart-card authentication.
How to confirm the fix worked
Confirm the installed OpenSC binary or library reports a version containing commit fe857cc4c68da4873071f168c9aaf9860040ff4e; run regression tests with both benign and boundary-case APDU responses to verify buffer handling.
Typical attack path
- Obtain physical access to a system with OpenSC installed and a smart-card reader
- Insert a USB device or smart card engineered to reply with malicious APDU data
- Trigger OpenSC library or tool communication with the card
- Exploit resulting memory corruption to read or alter process memory
How to detect it
Review system logs and application traces for unexpected APDU response lengths or memory-allocation failures immediately after card insertion; correlate with physical-access logs to identify unauthorized card-present events.
What your security team should do
- Apply the fixed commit immediately on all systems that use OpenSC for hardware-token authentication
- Restrict physical access to workstations and servers equipped with smart-card readers
- Audit application dependency trees to ensure no older OpenSC builds remain in use
- Monitor vendor advisories for any additional downstream packages that embed OpenSC
The record
A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. An attacker could use a crafted USB Device or Smart Card, which would present the system with a specially crafted response to APDUs. The following problems were caused by insufficient control of the response APDU buffer and its length when communicating with the card.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | opensc | 0 | No fix |
| Debian:11 | opensc | 0 | 0.21.0-1+deb11u1 |
| Debian:12 | opensc | 0 | No fix |
| Debian:13 | opensc | 0 | No fix |
| Mageia:9 | opensc | 0 | 0.25.0-1.1.mga9 |
| SUSE:Linux Enterprise Micro 5.1 | opensc | 0 | 0.19.0-150100.3.31.1 |
| SUSE:Linux Enterprise Micro 5.2 | opensc | 0 | 0.19.0-150100.3.31.1 |
| SUSE:Linux Enterprise Micro 5.3 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Micro 5.4 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Micro 5.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | opensc | 0 | 0.22.0-150600.11.3.1 |
| SUSE:Linux Enterprise Server 12 SP5 | opensc | 0 | 0.13.0-3.31.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | opensc | 0 | 0.13.0-3.31.1 |
| Ubuntu:20.04:LTS | opensc | 0 | No fix |
| Ubuntu:22.04:LTS | opensc | 0 | No fix |
| Ubuntu:24.04:LTS | opensc | 0 | No fix |
| Ubuntu:24.10 | opensc | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | opensc | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | opensc | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | opensc | 0 | 0.20.0-3ubuntu0.1~esm4 |
| Ubuntu:Pro:22.04:LTS | opensc | 0 | 0.22.0-1ubuntu2+esm1 |
| Ubuntu:Pro:24.04:LTS | opensc | 0 | 0.25.0~rc1-1ubuntu0.1~esm1 |
| openSUSE:Leap 15.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| openSUSE:Leap 15.6 | opensc | 0 | 0.22.0-150600.11.3.1 |
| openSUSE:Leap Micro 5.5 | opensc | 0 | 0.22.0-150400.3.12.1 |
| openSUSE:Tumbleweed | opensc | 0 | 0.25.1-2.1 |
Related vulnerabilities
- CVE-2024-8443 A heap-based buffer overflow vulnerability was found in the libopensc OpenPGP driver. Also affects opensc
- CVE-2024-45619 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2024-45620 A vulnerability was found in the pkcs15-init tool in OpenSC. Also affects opensc
- CVE-2024-45617 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2024-45618 A vulnerability was found in pkcs15-init in OpenSC. Also affects opensc
- CVE-2024-45615 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. Also affects opensc
- CVE-2026-10275 A flaw has been found in OpenSC up to 0.26.1. Also affects opensc
- CVE-2026-40528 OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun… Also affects opensc