CVE-2023-40661 Opensc: multiple memory issues with pkcs15-init (enrollment tool)
Attackers with physical access can exploit memory flaws in OpenSC's pkcs15-init tool via malicious smart cards to compromise key generation and card management.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-40661?
CVE-2023-40661 is a medium-severity memory corruption vulnerability in Opensc Project Opensc, published on 6 Nov 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
Several memory vulnerabilities were identified within the OpenSC packages, particularly in the card enrollment process using pkcs15-init when a user or administrator enrolls cards. To take advantage of these flaws, an attacker must have physical access to the computer system and employ a custom-crafted USB device or smart card to manipulate responses to APDUs. This manipulation can potentially allow compromise key generation, certificate loading, and other card management operations during enrollment.
Weakness: CWE-119
Which versions are affected by CVE-2023-40661?
It affects 2 products.
Products include Opensc Project Opensc, Redhat Enterprise Linux.
How do I fix CVE-2023-40661?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2023-40661 being exploited?
There is no known exploitation of CVE-2023-40661 in the wild and no public exploit code.
Other vulnerabilities in Opensc Project Opensc
Sources
Also known as AZL-31944, AZL-35075, CLSA-2026-1779101894, DEBIAN-CVE-2023-40661, GHSA-2c2j-2pgv-gfgc, UBUNTU-CVE-2023-40661.