# CVE-2023-40661: opensc: Several memory vulnerabilities were identified within the OpenSC packages, particularly in the card enrollment proces...

CVE-2023-40661 is fixed in 4 products on 1 platform, first by ALAS2023-2023-417, released October 30, 2023. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2023-40661
- Priority: Routine
- CVSS: 6.4 (medium)
- EPSS: 0.0132
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Oct 30, 2023

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | opensc Debian 12.15 (bookworm) | 0.23.0-0.3+deb12u1 | [DEBIAN-CVE-2023-40661](https://patchblox.com/security/data/fix/linux/debian-cve-2023-40661.md) | Nov 6, 2023 |
| Linux | opensc Debian 13.5 (trixie) | 0.23.0-2 | [DEBIAN-CVE-2023-40661](https://patchblox.com/security/data/fix/linux/debian-cve-2023-40661.md) | Nov 6, 2023 |
| Linux | opensc Debian 14 | 0.23.0-2 | [DEBIAN-CVE-2023-40661](https://patchblox.com/security/data/fix/linux/debian-cve-2023-40661.md) | Nov 6, 2023 |
| Linux | opensc RHEL 8 | 0:0.20.0-7.el8_9 | [RHSA-2023:7876](https://patchblox.com/security/data/fix/linux/rhsa-2023-7876.md) | Dec 19, 2023 |
| Linux | opensc RHEL 9 | 0:0.23.0-3.el9_3 | [RHSA-2023:7879](https://patchblox.com/security/data/fix/linux/rhsa-2023-7879.md) | Dec 19, 2023 |
| Linux | opensc Ubuntu 20.04 LTS (focal) | 0.20.0-3ubuntu0.1~esm4 | [opensc 0.20.0-3ubuntu0.1~esm4](https://patchblox.com/security/data/fix/linux/ubuntu-focal-opensc-0.20.0-3ubuntu0.1-esm4.md) | Sep 10, 2024 |
| Linux | opensc Ubuntu 22.04.1 LTS (jammy) | 0.22.0-1ubuntu2+esm1 | [opensc 0.22.0-1ubuntu2+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-opensc-0.22.0-1ubuntu2-esm1.md) | Sep 10, 2024 |
| Linux | opensc almalinux 8 | 0.20.0-7.el8_9 | [ALSA-2023:7876](https://patchblox.com/security/data/fix/linux/alsa-2023-7876.md) | Dec 19, 2023 |
| Linux | opensc almalinux 9 | 0.23.0-3.el9_3 | [ALSA-2023:7879](https://patchblox.com/security/data/fix/linux/alsa-2023-7879.md) | Dec 19, 2023 |
| Linux | opensc amzn 2023 | 0.23.0-3.amzn2023.0.2 | [ALAS2023-2023-417](https://patchblox.com/security/data/fix/linux/alas2023-2023-417.md) | Oct 30, 2023 |
| Linux | opensc ol 8 | 0:0.20.0-7.el8_9 | [ELSA-2023-7876](https://patchblox.com/security/data/fix/linux/elsa-2023-7876.md) | Dec 18, 2023 |
| Linux | opensc ol 9 | 0:0.23.0-3.el9_3 | [ELSA-2023-7879](https://patchblox.com/security/data/fix/linux/elsa-2023-7879.md) | Dec 19, 2023 |
| Linux | opensc-debuginfo amzn 2023 | 0.23.0-3.amzn2023.0.2 | [ALAS2023-2023-417](https://patchblox.com/security/data/fix/linux/alas2023-2023-417.md) | Oct 30, 2023 |
| Linux | opensc-debugsource amzn 2023 | 0.23.0-3.amzn2023.0.2 | [ALAS2023-2023-417](https://patchblox.com/security/data/fix/linux/alas2023-2023-417.md) | Oct 30, 2023 |
| Linux | opensc-pkcs11 Ubuntu 20.04 LTS (focal) | 0.20.0-3ubuntu0.1~esm4 | [opensc-pkcs11 0.20.0-3ubuntu0.1~esm4](https://patchblox.com/security/data/fix/linux/ubuntu-focal-opensc-pkcs11-0.20.0-3ubuntu0.1-esm4.md) | Sep 10, 2024 |
| Linux | opensc-pkcs11 Ubuntu 22.04.1 LTS (jammy) | 0.22.0-1ubuntu2+esm1 | [opensc-pkcs11 0.22.0-1ubuntu2+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-opensc-pkcs11-0.22.0-1ubuntu2-esm1.md) | Sep 10, 2024 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
