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

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.

Published: 2023-11-06 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-40661 is rated Moderate Risk (44.6/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 1.17%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2023-40661

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.32% 1.17% +0.85%
2 2025-11-21 0.53% 0.32% -0.20%
3 2025-11-18 0.53%

Full EPSS history (9 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-40661

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.4 3.1 MEDIUM
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H Click to expand
Attack vector (AV:P)
Hands-on access—USB, keyboard, opening the case—not something you do purely over the wire.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
0.7 4.7 [email protected]
6.4 3.1 MEDIUM
CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:P)
Hands-on access—USB, keyboard, opening the case—not something you do purely over the wire.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
0.5 5.9 [email protected]

Weakness enumeration for CVE-2023-40661

OS Trackers for CVE-2023-40661

vendor priority summary link
alpine CVE-2023-40661: 1 source package rows (opensc); 12 state rows across 6 repos (3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 5, open 7. https://security.alpinelinux.org/vuln/CVE-2023-40661
debian not yet assigned CVE-2023-40661 not yet assigned priority: Debian including 1 source packages (opensc), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2023-40661
gentoo normal CVE-2023-40661: 1 GLSA(s) (202412-15), 1 atom(s) (dev-libs/opensc); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-40661
redhat medium https://access.redhat.com/security/cve/CVE-2023-40661
suse medium https://www.suse.com/security/cve/CVE-2023-40661/
ubuntu medium CVE-2023-40661 medium priority: Ubuntu including 1 source packages (opensc), 12 status rows across 12 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 6, ignored 3, released 3. https://ubuntu.com/security/CVE-2023-40661

Affected software / configurations for CVE-2023-40661

Vendor Product Version Raw CPE
opensc_project opensc <= 0.23.0 cpe:2.3:a:opensc_project:opensc:*:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
redhat enterprise_linux 9.0 cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*

References for CVE-2023-40661

URL Tags
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 Third Party Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2240913 Issue Tracking
https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651 VDB Entry
https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1 Release Notes
https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories Vendor Advisory
http://www.openwall.com/lists/oss-security/2023/12/13/3
https://lists.debian.org/debian-lts-announce/2023/11/msg00024.html
https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html
https://lists.fedoraproject.org/archives/list/[email protected]/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/
https://lists.fedoraproject.org/archives/list/[email protected]/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/
cvelogic Threat Intelligence