CVE-2023-40661: Opensc: multiple memory issues with pkcs15-init (enrollment tool)

Published Sep 27, 2023
·
Updated

Last updated 10 April 2025

Other sources

Several memory issues that are security relevant that were reported since the release of OpenSC 0.23.0 and that are relevant to the handling the card enrollment process using pkcs15-init.

All of these require physical access to the computer at the time user or administrator would be enrolling the cards (generating keys and loading certificates, other card/token management) operations. The attack requires crafted USB device or smart card that would present the system with specially crafted responses to the APDUs so they are considered a high-complexity and low-severity. This issue is not exploitable just by using a PKCS#11 module as done in most of the end-user deployments.

https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651 https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1

Red Hat

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.

Debian

Affected Software

5 affected componentsFixes available
Opensc Project Opensc<=0.23.0
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
redhat/OpenSC<0.24.0
0.24.0
debian/opensc<=0.21.0-1
0.21.0-1+deb11u10.23.0-0.3+deb12u20.26.1-1

Event History

Nov 6, 2023
CVE Published
via MITRE·04:58 PM
Data Sourced
via MITRE·04:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeaknessAffected Software
Mar 12, 2025
Data Sourced
via Launchpad·09:39 AM
Description
Apr 10, 2025
Data Sourced
via Ubuntu·03:08 AM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-40661?

CVE-2023-40661 is a vulnerability in the OpenSC packages that allows attackers to exploit memory issues in the card enrollment process using pkcs15-init.

2

How severe is CVE-2023-40661?

CVE-2023-40661 has a severity rating of 6.4, which is considered medium.

3

How can an attacker exploit CVE-2023-40661?

To exploit CVE-2023-40661, an attacker needs physical access to the computer system and must use a custom-crafted attack.

4

Which software is affected by CVE-2023-40661?

The OpenSC packages versions up to 0.24.0, Opensc Project Opensc versions up to 0.23.0, Redhat Enterprise Linux versions 8.0 and 9.0 are affected by CVE-2023-40661.

5

How can I fix CVE-2023-40661?

To fix CVE-2023-40661, update the affected software to version 0.24.0 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203