{"id":"CVE-2023-40661","state":"PUBLISHED","title":"Opensc: multiple memory issues with pkcs15-init (enrollment tool)","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 \r\ncompromise key generation, certificate loading, and other card management operations during enrollment.","publishedAt":"2023-11-06T16:58:43.029Z","updatedAt":"2025-11-06T22:59:01.794Z","severity":{"score":5.4,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","source":"redhat"},"assigner":"redhat","products":["OpenSC","Red Hat Red Hat Enterprise Linux 8","Red Hat Red Hat Enterprise Linux 9","Red Hat Red Hat Enterprise Linux 7"],"affected":[{"packageName":"OpenSC","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.24.0","versionType":"semver"}],"collectionURL":"https://github.com/OpenSC/OpenSC"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","packageName":"opensc","defaultStatus":"affected","versions":[{"version":"0:0.20.0-7.el8_9","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:8::baseos"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"opensc","defaultStatus":"affected","versions":[{"version":"0:0.23.0-3.el9_3","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:9::baseos"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","packageName":"opensc","defaultStatus":"unknown","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:7"]}],"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"],"weaknesses":["CWE-119"],"ingestedAt":"2026-10-29T20:06:17.512Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/40xxx/CVE-2023-40661.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-40661","state":"PUBLISHED","datePublished":"2023-11-06T16:58:43.029Z","dateUpdated":"2025-11-06T22:59:01.794Z","assignerShortName":"redhat","assignerOrgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateReserved":"2023-08-18T08:08:53.353Z"},"containers":{"cna":{"title":"Opensc: multiple memory issues with pkcs15-init (enrollment tool)","descriptions":[{"lang":"en","value":"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 \r\ncompromise key generation, certificate loading, and other card management operations during enrollment."}],"affected":[{"packageName":"OpenSC","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.24.0","versionType":"semver"}],"collectionURL":"https://github.com/OpenSC/OpenSC"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","packageName":"opensc","defaultStatus":"affected","versions":[{"version":"0:0.20.0-7.el8_9","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:8::baseos"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","packageName":"opensc","defaultStatus":"affected","versions":[{"version":"0:0.23.0-3.el9_3","status":"unaffected","lessThan":"*","versionType":"rpm"}],"collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:9::baseos"]},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7","packageName":"opensc","defaultStatus":"unknown","collectionURL":"https://access.redhat.com/downloads/content/package-browser/","cpes":["cpe:/o:redhat:enterprise_linux:7"]}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2023:7876","name":"RHSA-2023:7876","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7879","name":"RHSA-2023:7879","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-40661","tags":["vdb-entry","x_refsource_REDHAT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240913","name":"RHBZ#2240913","tags":["issue-tracking","x_refsource_REDHAT"]},{"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"}],"metrics":[{"other":{"content":{"value":"Moderate","namespace":"https://access.redhat.com/security/updates/classification/"},"type":"Red Hat severity rating"}},{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"PHYSICAL","availabilityImpact":"HIGH","baseScore":5.4,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","version":"3.1"},"format":"CVSS"}],"problemTypes":[{"descriptions":[{"cweId":"CWE-119","description":"Improper Restriction of Operations within the Bounds of a Memory Buffer","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat","orgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateUpdated":"2025-11-06T22:59:01.794Z"},"datePublic":"2023-09-25T00:00:00.000Z","x_redhatCweChain":"CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer","timeline":[{"lang":"en","time":"2023-09-27T00:00:00.000Z","value":"Reported to Red Hat."},{"lang":"en","time":"2023-09-25T00:00:00.000Z","value":"Made public."}]},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2023/12/13/3","tags":["x_transferred"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7876","name":"RHSA-2023:7876","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7879","name":"RHSA-2023:7879","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-40661","tags":["vdb-entry","x_refsource_REDHAT","x_transferred"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240913","name":"RHBZ#2240913","tags":["issue-tracking","x_refsource_REDHAT","x_transferred"]},{"url":"https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651","tags":["x_transferred"]},{"url":"https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1","tags":["x_transferred"]},{"url":"https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/11/msg00024.html","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:49:27.862Z"}}]}}}