{"id":"CVE-2023-40661","title":"Opensc: multiple memory issues with pkcs15-init (enrollment tool)","summary":"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 …","severity":"medium","cvss":5.4,"cvssVector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","cvssSource":"cna","cwe":["CWE-119"],"vendor":"Red Hat","product":"OpenSC","affected":["OpenSC < 0.24.0","opensc (all versions)","opensc (all versions)","opensc"],"published":"2023-11-06","updated":"2026-11-06","sourceUpdated":"2026-11-06T20:26:32.692Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2023-40661","references":[{"url":"https://access.redhat.com/errata/RHSA-2023:7876","label":"RHSA-2023:7876"},{"url":"https://access.redhat.com/errata/RHSA-2023:7879","label":"RHSA-2023:7879"},{"url":"https://access.redhat.com/security/cve/CVE-2023-40661"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240913","label":"RHBZ#2240913"},{"url":"https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651"},{"url":"https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1"},{"url":"https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories"}],"tags":["cve.org"],"epss":0.01318,"epssPercentile":0.70953,"ingestedAt":"2026-11-06T21:04:04.249Z","slug":"CVE-2023-40661","body":"## Overview\n\nSeveral 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 \r\ncompromise key generation, certificate loading, and other card management operations during enrollment.\n\n## Affected\n\n- `OpenSC < 0.24.0`\n- `opensc (all versions)`\n- `opensc (all versions)`\n- `opensc`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":30,"depthScoreParts":{"impact":29.7,"likelihood":0.3,"exploitation":0,"ransomware":0},"changes":[]}