CVE-2024-45617
Low · 3.9CVSS
3.9
EPSS
0.3%
Published
Sep 3, 2024
CISA due date
—
Cloudanix analysis
Smart-card software can misbehave when a specially made card is plugged in, potentially letting someone nearby cause small security problems on the computer.
- Exploitation
- Physical Access
- Attacker needs
- Physical Access
- Complexity
- High
- Impact
- Other
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Missing or insufficient checks on return values from APDU handling functions in OpenSC allow use of uninitialized variables when a crafted smart card or USB device supplies unexpected responses.
Why it matters to the business
Physical attackers with access to card readers can trigger limited integrity or confidentiality effects on systems relying on OpenSC for cryptographic operations, though remote exploitation is not possible.
How an attack unfolds
An attacker presents a malicious smart card or USB device that responds to APDUs in a way that bypasses return-value validation, causing the library to operate on uninitialized memory and produce unexpected results during PKCS#11 or minidriver operations.
How to fix it
Upgrade OpenSC to the commit fe857cc4c68da4873071f168c9aaf9860040ff4e or later; rebuild and redeploy any dependent packages or images that embed the vulnerable library.
How to confirm the fix worked
Confirm the installed OpenSC binary or library reports a build containing commit fe857cc4c68da4873071f168c9aaf9860040ff4e; perform regression testing with malformed APDU responses to verify proper error handling.
Typical attack path
- Obtain physical access to a system with an OpenSC-enabled smart card reader
- Insert a crafted USB device or smart card
- Trigger APDU exchanges that return unexpected values
- Exploit missing return-value checks to operate on uninitialized variables
- Achieve limited local impact on cryptographic state or data handling
How to detect it
Review system and application logs for unexpected APDU handling errors or crashes involving OpenSC components; correlate with physical access events to smart card readers.
What your security team should do
- Apply the fixed commit fe857cc4c68da4873071f168c9aaf9860040ff4e across all OpenSC deployments immediately
- Restrict physical access to systems and readers that accept smart cards or tokens
- Audit and replace any downstream packages that bundle older OpenSC versions
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. Insufficient or missing checking of return values of functions leads to unexpected work with variables that have not been initialized.
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-45618 A vulnerability was found in pkcs15-init in OpenSC. Also affects opensc
- CVE-2024-45616 A vulnerability was found in OpenSC, OpenSC tools, PKCS#11 module, minidriver, and CTK. 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