{"id":"CVE-2023-40661","aliases":["ALPINE-CVE-2023-40661","ALSA-2023:7876","ALSA-2023:7879","AZL-31944","AZL-35075","CLSA-2026-1779101894","DEBIAN-CVE-2023-40661","DLA-3668-1","DLA-4004-1","EUVD-2023-45217","GHSA-2c2j-2pgv-gfgc","RHSA-2023:7876","RHSA-2023:7879","SUSE-SU-2023:4065-1","SUSE-SU-2023:4089-1","SUSE-SU-2023:4104-1","UBUNTU-CVE-2023-40661","USN-7346-1","USN-7346-3","openSUSE-SU-2024:13314-1"],"status":"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.","severity":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.01318,"percentile":0.71068,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119"],"published":"2023-10-12T11:26:06Z","modified":"2026-11-03T06:32:59Z","fixes":[{"ecosystem":"Alpine:v3.19","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"opensc","fixed_in":["0.24.0-r0"],"sources":["osv"]},{"ecosystem":"Azure Linux:2","package":"opensc","fixed_in":["0.23.0-5"],"sources":["osv"]},{"ecosystem":"Azure Linux:3","package":"opensc","fixed_in":["0.25.1-3"],"sources":["osv"]},{"ecosystem":"TuxCare:AlmaLinux:9.2","package":"opensc","fixed_in":["0.22.0-2.el9_2.tuxcare.els6"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"opensc","fixed_in":["0.23.0-0.3+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"opensc","fixed_in":["0.23.0-2"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"opensc","fixed_in":["0.23.0-2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"opensc","fixed_in":["0.20.0-3ubuntu0.1~esm4"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"opensc","fixed_in":["0.22.0-1ubuntu2+esm1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Alpine:v3.19","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-r0"}]}]},{"source":"osv","ecosystem":"AlmaLinux:8","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.0-7.el8_9"}]}],"bundled":2},{"source":"osv","ecosystem":"AlmaLinux:9","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-3.el9_3"}]}],"bundled":3},{"source":"osv","ecosystem":"Azure Linux:2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-5"}]}]},{"source":"osv","ecosystem":"Azure Linux:3","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.25.1-3"}]}]},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-2.el9_2.tuxcare.els6"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-0.3+deb12u1"}]}],"versions":["0.23.0-0.3"]},{"source":"osv","ecosystem":"Debian:13","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-2"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-2"}]}]},{"source":"osv","ecosystem":"Debian:10","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-1+deb10u3"}]}],"versions":["0.19.0-1","0.19.0-1+deb10u1","0.19.0-1+deb10u2"],"bundled":2},{"source":"osv","ecosystem":"Debian:11","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.21.0-1+deb11u1"}]}],"versions":["0.21.0-1"],"bundled":18},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.20.0-7.el8_9"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opensc-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.20.0-7.el8_9"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:8::baseos","package":"opensc-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.20.0-7.el8_9"}]}],"bundled":2},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::baseos","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.23.0-3.el9_3"}]}],"bundled":3},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::baseos","package":"opensc-debuginfo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.23.0-3.el9_3"}]}],"bundled":3},{"source":"osv","ecosystem":"Red Hat:enterprise_linux:9::baseos","package":"opensc-debugsource","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.23.0-3.el9_3"}]}],"bundled":3},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 12 SP5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.0-3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 12 SP5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.0-3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.3","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.4","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP1-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP1","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Manager Proxy 4.2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Manager Server 4.2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.1","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Enterprise Storage 7.1","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.19.0-150100.3.25.1"}]}],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.0-3ubuntu0.1~esm4"}]}],"versions":["0.19.0-2","0.20.0-1","0.20.0-2","0.20.0-3","0.20.0-3ubuntu0.1~esm1","0.20.0-3ubuntu0.1~esm2","0.20.0-3ubuntu0.1~esm3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-1ubuntu2+esm1"}]}],"versions":["0.21.0-1ubuntu1","0.22.0-1ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.15.0-1ubuntu1+esm2"}]}],"versions":["0.15.0-1ubuntu1","0.15.0-1ubuntu1+esm1"],"bundled":13},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.17.0-3ubuntu0.1~esm2"}]}],"versions":["0.17.0-1","0.17.0-2","0.17.0-2build1","0.17.0-3","0.17.0-3ubuntu0.1~esm1"],"bundled":13},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.0-3ubuntu0.1~esm2"}]}],"versions":["0.19.0-2","0.20.0-1","0.20.0-2","0.20.0-3","0.20.0-3ubuntu0.1~esm1"],"bundled":13},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-1ubuntu2+esm1"}]}],"versions":["0.21.0-1ubuntu1","0.22.0-1ubuntu2"],"bundled":13},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.25.0~rc1-1ubuntu0.1~esm1"}]}],"versions":["0.23.0-1ubuntu4","0.24.0~rc1-1","0.25.0~rc1-1","0.25.0~rc1-1build1","0.25.0~rc1-1build2"],"bundled":13},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.20.0-3ubuntu0.1~esm4"}]}],"versions":["0.19.0-2","0.20.0-1","0.20.0-2","0.20.0-3","0.20.0-3ubuntu0.1~esm1","0.20.0-3ubuntu0.1~esm2","0.20.0-3ubuntu0.1~esm3"],"bundled":11},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-3.1"}]}],"bundled":3}],"products":[{"vendor":"opensc_project","product":"opensc"},{"vendor":"red hat","product":"red hat enterprise linux 7"},{"vendor":"red hat","product":"red hat enterprise linux 8"},{"vendor":"red hat","product":"red hat enterprise linux 9"},{"vendor":"redhat","product":"enterprise_linux"}],"references":[{"url":"https://access.redhat.com/errata/RHSA-2023:7876","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2023:7879","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-40661","tags":["vdb-entry","x_refsource_REDHAT","x_transferred","Third Party Advisory","report","advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240913","tags":["issue-tracking","x_refsource_REDHAT","x_transferred","Issue Tracking","report"]},{"url":"https://github.com/OpenSC/OpenSC/issues/2792#issuecomment-1674806651","tags":["x_transferred","VDB Entry","report","article"]},{"url":"https://github.com/OpenSC/OpenSC/releases/tag/0.24.0-rc1","tags":["x_transferred","Release Notes","web","article"]},{"url":"https://github.com/OpenSC/OpenSC/wiki/OpenSC-security-advisories","tags":["x_transferred","Vendor Advisory","advisory","article"]},{"url":"http://www.openwall.com/lists/oss-security/2023/12/13/3","tags":["x_transferred","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/11/msg00024.html","tags":["x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE/","tags":["x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP/","tags":["x_transferred","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00026.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-40661","tags":["web","advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3CPQOMCDWFRBMEFR5VK4N5MMXXU42ODE"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GLYEFIBBA37TK3UNMZN5NOJ7IWCIXLQP"},{"url":"https://github.com/advisories/GHSA-2c2j-2pgv-gfgc"},{"url":"https://security.alpinelinux.org/vuln/CVE-2023-40661","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-40660","tags":["report"]},{"url":"https://bugzilla.redhat.com/2240912","tags":["report"]},{"url":"https://bugzilla.redhat.com/2240913","tags":["report"]},{"url":"https://errata.almalinux.org/8/ALSA-2023-7876.html","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2023-4535","tags":["report"]},{"url":"https://bugzilla.redhat.com/2240914","tags":["report"]},{"url":"https://errata.almalinux.org/9/ALSA-2023-7879.html","tags":["advisory"]},{"url":"https://errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2026-1779101894.html","tags":["advisory"]},{"url":"https://access.redhat.com/downloads/content/package-browser/","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/40xxx/CVE-2023-40661.json","tags":["advisory"]},{"url":"https://github.com/OpenSC/OpenSC","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2023-40661","tags":["advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240912","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_7876.json","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-40660","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-40660","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-40661","tags":["advisory","report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2240914","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_7879.json","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-4535","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-4535","tags":["advisory"]},{"url":"https://github.com/OpenSC/OpenSC/commit/f1993dc4e0b33050b8f72a3558ee88b24c4063b2","tags":["article"]},{"url":"https://www.suse.com/support/update/announcement/2023/suse-su-20234065-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1191957","tags":["report"]},{"url":"https://bugzilla.suse.com/1215761","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2021-42782","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2023-40661","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2023/suse-su-20234089-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1215762","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2023-40660","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2023/suse-su-20234104-1/","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2023-40661","tags":["report"]},{"url":"https://github.com/OpenSC/OpenSC/wiki/CVE-2023-40661","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7346-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/notices/USN-7346-3","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-42780","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-42782","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-2977","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-5992","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2023-40660","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-8443","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45615","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45616","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45617","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45618","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45619","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-45620","tags":["report"]},{"url":"https://launchpad.net/bugs/2104948","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2023-4535","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2023-40661","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.","status":"published","published":"2023-11-06T16:58:43.029Z","modified":"2026-11-06T20:26:32.692Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-119"],"updated_at":"2026-11-06T21:31:06.649526Z"}],"euvd":[{"id":"EUVD-2023-45217","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.","status":"published","published":"2023-11-06T16:58:43Z","modified":"2026-11-06T20:26:32Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium"}],"updated_at":"2026-11-06T21:07:00.111123Z"}],"ghsa":[{"id":"GHSA-2c2j-2pgv-gfgc","title":"Several memory vulnerabilities were identified within the OpenSC packages, particularly in the...","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 \ncompromise key generation, certificate loading, and other card management operations during enrollment.","status":"published","published":"2023-11-06T18:30:19Z","modified":"2025-11-04T00:30:42Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium"}],"cwes":["CWE-119"],"updated_at":"2026-11-02T15:04:25.970519Z"}],"nvd":[{"id":"CVE-2023-40661","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.","status":"published","published":"2023-11-06T17:15:11.83Z","modified":"2026-11-06T21:17:01.99Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium","assessor":"primary"}],"cwes":["CWE-119"],"updated_at":"2026-11-07T00:02:29.674168Z"}],"osv":[{"id":"ALPINE-CVE-2023-40661","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.","status":"published","published":"2023-11-06T17:15:11.83Z","modified":"2026-11-03T06:32:59.185508271Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-03T07:16:09.603409Z"},{"id":"AZL-31944","title":"CVE-2023-40661 affecting package opensc for versions less than 0.23.0-5","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.","status":"published","published":"2023-11-06T17:15:11Z","modified":"2026-04-21T04:26:35.822373Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:28:03.46006Z"},{"id":"AZL-35075","title":"CVE-2023-40661 affecting package opensc for versions less than 0.25.1-3","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.","status":"published","published":"2023-11-06T17:15:11Z","modified":"2026-04-21T04:47:46.008386Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:28:04.173658Z"},{"id":"CVE-2023-40661","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.","status":"published","published":"2023-11-06T16:58:43.029Z","modified":"2026-11-08T02:30:22.123599936Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium"}],"cwes":["CWE-119"],"updated_at":"2026-11-07T11:15:38.581573Z"},{"id":"DEBIAN-CVE-2023-40661","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 compromise key generation, certificate loading, and other card management operations during enrollment.","status":"published","published":"2023-11-06T17:15:11.83Z","modified":"2026-11-07T09:47:30.24082413Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-07T10:14:39.995311Z"},{"id":"RHSA-2023:7876","title":"Red Hat Security Advisory: opensc security update","status":"published","published":"2024-09-16T16:11:01Z","modified":"2026-03-18T11:34:07.917089Z","cvss":[{"version":"3.1","score":6.6,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:12.270484Z"},{"id":"RHSA-2023:7879","title":"Red Hat Security Advisory: opensc security update","status":"published","published":"2024-09-16T16:11:12Z","modified":"2026-03-18T11:34:07.710682Z","cvss":[{"version":"3.1","score":6.6,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T15:53:12.270484Z"},{"id":"UBUNTU-CVE-2023-40661","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.","status":"published","published":"2023-11-06T17:15:00Z","modified":"2026-02-04T03:11:07.735902Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H","level":"medium"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","level":"medium"}],"updated_at":"2026-11-02T16:54:22.741943Z"},{"id":"ALSA-2023:7876","title":"Moderate: opensc security update","description":"The OpenSC set of libraries and utilities provides support for working with smart cards. OpenSC focuses on cards that support cryptographic operations and enables their use for authentication, mail encryption, or digital signatures.\n\nSecurity Fix(es):\n\n* OpenSC: Potential PIN bypass when card tracks its own login state (CVE-2023-40660)\n* OpenSC: multiple memory issues with pkcs15-init (enrollment tool) (CVE-2023-40661)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.","status":"published","published":"2023-12-19T00:00:00Z","modified":"2026-10-29T11:02:20.273687541Z","updated_at":"2026-11-02T15:27:52.091404Z"},{"id":"ALSA-2023:7879","title":"Moderate: opensc security update","description":"The OpenSC set of libraries and utilities provides support for working with smart cards. OpenSC focuses on cards that support cryptographic operations and enables their use for authentication, mail encryption, or digital signatures.\n\nSecurity Fix(es):\n\n* OpenSC: Potential PIN bypass when card tracks its own login state (CVE-2023-40660)\n* OpenSC: multiple memory issues with pkcs15-init (enrollment tool) (CVE-2023-40661)\n* OpenSC: out-of-bounds read in MyEID driver handling encryption using symmetric keys (CVE-2023-4535)\n\nFor more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.","status":"published","published":"2023-12-19T00:00:00Z","modified":"2026-10-29T11:31:37.564481293Z","updated_at":"2026-11-02T15:27:52.091404Z"},{"id":"CLSA-2026-1779101894","title":"opensc: Fix of CVE-2023-40661","description":"- CVE-2023-40661: fix multiple smartcard pkcs15init buffer overflows, underflows and out-of-bounds writes (sc_pkcs15init_rmdir, setcos_create_key, cosm_new_file, cosm_create_key, sc_pkcs15_get_lastupdate, iasecc-sdo, entersafe, epass2003 keygen)","status":"published","published":"2026-05-19T00:29:54Z","modified":"2026-06-01T00:32:33.722069103Z","updated_at":"2026-11-02T15:43:45.090939Z"},{"id":"DLA-3668-1","title":"opensc - security update","status":"published","published":"2023-11-27T00:00:00Z","modified":"2026-03-09T01:22:28.273752Z","updated_at":"2026-11-02T15:46:12.203458Z"},{"id":"DLA-4004-1","title":"opensc - security update","status":"published","published":"2024-12-28T00:00:00Z","modified":"2026-03-09T01:19:21.029361Z","updated_at":"2026-11-02T15:46:12.203458Z"},{"id":"openSUSE-SU-2024:13314-1","title":"opensc-0.23.0-3.1 on GA media","description":"These are all security issues fixed in the opensc-0.23.0-3.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:15:25.295446Z","updated_at":"2026-11-02T16:58:36.025801Z"},{"id":"SUSE-SU-2023:4065-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues:\n\n- CVE-2021-42782: Fixed several stack buffer overflows (bsc#1191957).\n- CVE-2023-40661: Fixed several memory safety issues that could happen\n  during the card enrollment process using pkcs15-init (bsc#1215761).\n","status":"published","published":"2023-10-12T11:26:06Z","modified":"2026-02-04T04:11:57.893083Z","updated_at":"2026-11-02T15:53:53.440387Z"},{"id":"SUSE-SU-2023:4089-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues:\n\n- CVE-2023-40660: Fixed a PIN bypass that could be triggered when\n  cards tracked their own login state (bsc#1215762).\n- CVE-2023-40661: Fixed several memory safety issues that could happen\n  during the card enrollment process using pkcs15-init (bsc#1215761).\n","status":"published","published":"2023-10-16T11:17:46Z","modified":"2026-02-04T02:13:34.560908Z","updated_at":"2026-11-02T15:53:53.440387Z"},{"id":"SUSE-SU-2023:4104-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues:\n\n- CVE-2023-40660: Fixed a PIN bypass that could be triggered when\n  cards tracked their own login state (bsc#1215762).\n- CVE-2023-40661: Fixed several memory safety issues that could happen\n  during the card enrollment process using pkcs15-init (bsc#1215761).\n","status":"published","published":"2023-10-17T15:36:49Z","modified":"2025-05-02T04:35:22.703198Z","updated_at":"2026-11-02T15:53:53.865042Z"},{"id":"USN-7346-1","title":"opensc vulnerabilities","description":"It was discovered that OpenSC did not correctly handle certain memory\noperations, which could lead to a use-after-free vulnerability. An\nattacker could possibly use this issue to cause a denial of service or\nexecute arbitrary code. This issue only affected Ubuntu 16.04 LTS,\nUbuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)\n\nIt was discovered that OpenSC did not correctly handle certain memory\noperations, which could lead to a stack buffer overflow. An attacker\ncould possibly use this issue to cause a denial of service or execute\narbitrary code. This issue only affected Ubuntu 20.04 LTS. (CVE-2021-42782)\n\nIt was discovered that OpenSC did not correctly handle the length of\ncertain buffers, which could lead to a out-of-bounds access vulnerability.\nAn attacker could possibly use this issue to cause a denial of service or\nexecute arbitrary code. This issue only affected Ubuntu 16.04 LTS,\nUbuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2023-2977)\n\nDeepanjan Pal discovered that OpenSC did not correctly authenticate a zero\nlength PIN. A physically proximate attacker could possibly use this issue\nto gain unauthorized access to certain systems. This issue only affected \nUbuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2023-40660)\n\nIt was discovered that OpenSC did not correctly handle certain memory\noperations. A physically proximate attacker could possibly use this issue\nto compromise key generation, certificate loading and other card\nmanagement operations. This issue only affected Ubuntu 20.04 LTS and\nUbuntu 22.04 LTS. (CVE-2023-40661)\n\nHubert Kario, Michal Shagam and Eyal Ronen discovered that OpenSC had a\ntiming side-channel and incorrectly handled RSA padding. An attacker\ncould possibly use this issue to recover sensitive information. This issue\nonly affected Ubuntu 22.04 LTS. (CVE-2023-5992)\n\nMatteo Marini discovered that OpenSC did not properly manage memory due to\ncertain uninitialized variables. A physically proximate attacker could\npossibly use this issue to gain unauthorized access to certain systems.\nThis issue only affected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS,\nUbuntu 24.04 LTS and Ubuntu 24.10. (CVE-2024-45615)\n\nMatteo Marini discovered that OpenSC did not correctly handle certain\nmemory operations. A physically proximate attacker could possibly use this\nissue to gain unauthorized access to certain systems. This issue only\naffected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and\nUbuntu 24.10. (CVE-2024-45616, CVE-2024-45617)\n\nMatteo Marini discovered that OpenSC did not correctly handle certain\nmemory operations. A physically proximate attacker could possibly use this\nissue to gain unauthorized access to certain systems.\n(CVE-2024-45618, CVE-2024-45620)\n\nMatteo Marini discovered that OpenSC did not correctly handle certain\nmemory operations. A physically proximate attacker could possibly use this\nissue to gain unauthorized access to certain systems. This issue only\naffected Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and Ubuntu 24.10.\n(CVE-2024-45619)\n\nIt was discovered that OpenSC did not correctly handle certain memory\noperations, which could lead to a buffer overflow. A physically\nproximate attacker could possibly use this issue to compromise card\nmanagement operations during enrollment and modification. This issue only\naffected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and\nUbuntu 24.10. (CVE-2024-8443)\n","status":"published","published":"2025-03-12T05:37:20Z","modified":"2026-06-25T13:32:08.287860187Z","updated_at":"2026-11-02T16:58:19.988474Z"},{"id":"USN-7346-3","title":"opensc vulnerabilities","description":"USN-7346-1 fixed vulnerabilities in OpenSC. The update introduced a\nregression which broke smartcard based authentication. This update fixes\nthe problem.\n\nWe apologize for the inconvenience.\n\nOriginal advisory details:\n\n It was discovered that OpenSC did not correctly handle certain memory\n operations, which could lead to a use-after-free vulnerability. An\n attacker could possibly use this issue to cause a denial of service or\n execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,\n Ubuntu 18.04 LTS and Ubuntu 20.04 LTS. (CVE-2021-42780)\n \n It was discovered that OpenSC did not correctly handle certain memory\n operations, which could lead to a stack buffer overflow. An attacker\n could possibly use this issue to cause a denial of service or execute\n arbitrary code. This issue only affected Ubuntu 20.04 LTS. \n (CVE-2021-42782)\n \n It was discovered that OpenSC did not correctly handle the length of\n certain buffers, which could lead to a out-of-bounds access vulnerability.\n An attacker could possibly use this issue to cause a denial of service or\n execute arbitrary code. This issue only affected Ubuntu 16.04 LTS,\n Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2023-2977)\n \n Deepanjan Pal discovered that OpenSC did not correctly authenticate a zero\n length PIN. A physically proximate attacker could possibly use this issue\n to gain unauthorized access to certain systems. This issue only affected \n Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2023-40660)\n \n It was discovered that OpenSC did not correctly handle certain memory\n operations. A physically proximate attacker could possibly use this issue\n to compromise key generation, certificate loading and other card\n management operations. This issue only affected Ubuntu 20.04 LTS and\n Ubuntu 22.04 LTS. (CVE-2023-40661)\n \n Hubert Kario, Michal Shagam and Eyal Ronen discovered that OpenSC had a\n timing side-channel and incorrectly handled RSA padding. An attacker\n could possibly use this issue to recover sensitive information. This issue\n only affected Ubuntu 22.04 LTS. (CVE-2023-5992)\n \n Matteo Marini discovered that OpenSC did not properly manage memory due to\n certain uninitialized variables. A physically proximate attacker could\n possibly use this issue to gain unauthorized access to certain systems.\n This issue only affected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS,\n Ubuntu 24.04 LTS and Ubuntu 24.10. (CVE-2024-45615)\n \n Matteo Marini discovered that OpenSC did not correctly handle certain\n memory operations. A physically proximate attacker could possibly use this\n issue to gain unauthorized access to certain systems. This issue only\n affected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and\n Ubuntu 24.10. (CVE-2024-45616, CVE-2024-45617)\n \n Matteo Marini discovered that OpenSC did not correctly handle certain\n memory operations. A physically proximate attacker could possibly use this\n issue to gain unauthorized access to certain systems.\n (CVE-2024-45618, CVE-2024-45620)\n \n Matteo Marini discovered that OpenSC did not correctly handle certain\n memory operations. A physically proximate attacker could possibly use this\n issue to gain unauthorized access to certain systems. This issue only\n affected Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and Ubuntu 24.10.\n (CVE-2024-45619)\n \n It was discovered that OpenSC did not correctly handle certain memory\n operations, which could lead to a buffer overflow. A physically\n proximate attacker could possibly use this issue to compromise card\n management operations during enrollment and modification. This issue only\n affected Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS and\n Ubuntu 24.10. (CVE-2024-8443)\n","status":"published","published":"2025-04-09T23:41:04Z","modified":"2026-04-27T18:02:26.043339578Z","updated_at":"2026-11-02T16:58:19.988474Z"}]}}
