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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.4, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-11-06 · Modified: 2026-11-06
- Aliases: UBUNTU-CVE-2023-40661, DEBIAN-CVE-2023-40661, ALPINE-CVE-2023-40661
- Record: https://cvemate.com/vulnerability/CVE-2023-40661 · JSON: https://cvemate.com/vulnerability/CVE-2023-40661/json

## Description

```text
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.
```

## Signals

- CVSS: 6.4 medium (v3.1, NVD) CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- EPSS: 1.329%, percentile 72.019%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- alpine opensc (Alpine Linux): \< 0.24.0-r0
- debian opensc (Debian): \< 0.23.0-0.3+deb12u1 \| \< 0.23.0-2
- ubuntu opensc (Ubuntu): \< 0.20.0-3ubuntu0.1~esm4 \| \< 0.22.0-1ubuntu2+esm1
- opensc\_project opensc: ≤ 0.23.0
- redhat enterprise\_linux: 8.0 \| 9.0

## References

- <https://access.redhat.com/errata/RHSA-2023:7876>
- <https://access.redhat.com/errata/RHSA-2023:7879>
- <https://access.redhat.com/security/cve/CVE-2023-40661>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2240913>
- <https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651>
- <https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1>
- <https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories>
- <http://www.openwall.com/lists/oss-security/2023/12/13/3>
- <https://lists.debian.org/debian-lts-announce/2023/11/msg00024.html>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/>
- <https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html>
- <https://ubuntu.com/security/CVE-2023-40661>
- <https://www.cve.org/CVERecord?id=CVE-2023-40661>
- <https://github.com/OpenSC/OpenSC/wiki/CVE-2023-40661>
- <https://ubuntu.com/security/notices/USN-7346-1>
- <https://ubuntu.com/security/notices/USN-7346-3>
- <https://security-tracker.debian.org/tracker/CVE-2023-40661>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-40661>
- <https://security.alpinelinux.org/vuln/CVE-2023-40661>

---

Data as of 2026-12-05T13:42:37.355Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
