{"id":"CVE-2026-40528","aliases":["AZL-89147","CLSA-2026-1780711381","CLSA-2026-1781088266","EUVD-2026-33320","GHSA-vxjj-52h8-95w5","MGASA-2026-0231","SUSE-SU-2026:22103-1","SUSE-SU-2026:22139-1","SUSE-SU-2026:2657-1","SUSE-SU-2026:2697-1","openSUSE-SU-2026:11022-1","openSUSE-SU-2026:21873-1"],"status":"published","title":"OpenSC \u003c 0.27.0 Buffer Overrun in do_key_value() via profile.c","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","severity":{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","level":"low","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00188,"percentile":0.08416,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-121","CWE-122"],"published":"2026-05-29T13:38:11Z","modified":"2026-10-28T10:55:11Z","fixes":[{"ecosystem":"Azure Linux:3","package":"opensc","fixed_in":["0.27.0-1"],"sources":["osv"]},{"ecosystem":"TuxCare:AlmaLinux:9.6","package":"opensc","fixed_in":["0.23.0-5.el9.tuxcare.els4"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Azure Linux:3","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.27.0-1"}]}]},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.2","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-2.el9_2.tuxcare.els8"}]}],"bundled":2},{"source":"osv","ecosystem":"TuxCare:AlmaLinux:9.6","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.23.0-5.el9.tuxcare.els4"}]}]},{"source":"osv","ecosystem":"Mageia:9","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.25.0-1.3.mga9"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Micro 6.0","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-6.1"}]}],"bundled":2},{"source":"osv","ecosystem":"SUSE:Linux Micro 6.1","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.24.0-slfo.1.1_4.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.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.4","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Micro 5.5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP5-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP4","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP5","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150400.3.17.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP7","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150600.11.11.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server 15 SP6-LTSS","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150600.11.11.1"}]}],"bundled":6},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP6","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.22.0-150600.11.11.1"}]}],"bundled":6},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.27.1-2.1"}]}],"bundled":2},{"source":"osv","ecosystem":"openSUSE:Leap 16.0","package":"opensc","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.26.1-160000.5.1"}]}],"bundled":2}],"products":[{"vendor":"opensc","product":"opensc"},{"vendor":"opensc_project","product":"opensc"}],"references":[{"url":"https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59","tags":["patch","Patch","fix"]},{"url":"https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c","tags":["third-party-advisory","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40528","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-vxjj-52h8-95w5"},{"url":"https://errata.tuxcare.com/els_os/almalinux9.2esu/CLSA-2026-1780711381.html","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40510","tags":["advisory"]},{"url":"https://errata.tuxcare.com/els_os/tuxcare9.6esu/CLSA-2026-1781088266.html","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40528.json","tags":["advisory"]},{"url":"https://github.com/OpenSC/OpenSC","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2026-0231.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=35710","tags":["report"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/message/BXWQZWIKO7R5XJCNG2QJKDJX4QJMW4G5/","tags":["web"]},{"url":"https://github.com/OpenSC/OpenSC/issues/3682","tags":["report"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-202622103-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1266963","tags":["report"]},{"url":"https://bugzilla.suse.com/1267246","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2026-10275","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-40528","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-202622139-1/","tags":["advisory"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-20262657-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1261214","tags":["report"]},{"url":"https://bugzilla.suse.com/1261218","tags":["report"]},{"url":"https://bugzilla.suse.com/1261219","tags":["report"]},{"url":"https://bugzilla.suse.com/1261220","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2025-49010","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-66037","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-66038","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2025-66215","tags":["web"]},{"url":"https://www.suse.com/support/update/announcement/2026/suse-su-20262697-1/","tags":["advisory"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-40528","title":"OpenSC \u003c 0.27.0 Buffer Overrun in do_key_value() via profile.c","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T13:38:11.831Z","modified":"2026-07-14T20:00:40.951Z","cvss":[{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","level":"low","assessor":"cna"},{"version":"3.1","score":3.8,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","level":"low","assessor":"cna"}],"cwes":["CWE-121","CWE-122"],"updated_at":"2026-11-02T13:43:00.288193Z"}],"euvd":[{"id":"EUVD-2026-33320","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T13:38:11Z","modified":"2026-07-14T20:00:40Z","cvss":[{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","level":"low"}],"updated_at":"2026-11-02T18:19:58.805605Z"}],"ghsa":[{"id":"GHSA-vxjj-52h8-95w5","title":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun...","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T15:30:33Z","modified":"2026-05-29T15:30:38Z","cvss":[{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low"},{"version":"3.1","score":3.8,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","level":"low"}],"cwes":["CWE-121"],"updated_at":"2026-11-02T15:08:22.826978Z"}],"nvd":[{"id":"CVE-2026-40528","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T14:16:26.73Z","modified":"2026-07-21T12:10:00.09Z","cvss":[{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"low","assessor":"secondary"},{"version":"3.1","score":3.8,"vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","level":"low","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-121","CWE-122"],"updated_at":"2026-11-02T14:12:21.244426Z"}],"osv":[{"id":"CVE-2026-40528","title":"OpenSC \u003c 0.27.0 Buffer Overrun in do_key_value() via profile.c","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T13:38:11.831Z","modified":"2026-10-28T10:55:11.52272398Z","cvss":[{"version":"4.0","score":1,"vector":"CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","level":"low"}],"cwes":["CWE-121","CWE-122"],"updated_at":"2026-11-02T15:45:03.424067Z"},{"id":"AZL-89147","title":"CVE-2026-40528 affecting package opensc for versions less than 0.27.0-1","description":"OpenSC before 0.27.0, fixed in commit 0358817, contains a stack and heap buffer overrun vulnerability in the do_key_value() function in src/pkcs15init/profile.c that allows attackers to corrupt memory by supplying a crafted profile configuration file. During pkcs15-init invocation, a key value entry beginning with '=' followed by more than sizeof(keybuf) characters is copied into keybuf via memcpy without a length check, causing both stack and heap buffer overruns.","status":"published","published":"2026-05-29T14:16:26Z","modified":"2026-10-22T15:09:00Z","updated_at":"2026-11-02T15:28:11.069402Z"},{"id":"CLSA-2026-1780711381","title":"opensc: Fix of 2 CVEs","description":"- CVE-2026-40510: stack buffer overflow in piv_process_history() via crafted PIV Key History Object\n- CVE-2026-40528: stack/heap buffer overrun in do_key_value() via overlong pkcs15init profile key value","status":"published","published":"2026-06-08T19:27:59Z","modified":"2026-10-26T09:30:17.675258417Z","updated_at":"2026-11-02T15:43:45.445699Z"},{"id":"CLSA-2026-1781088266","title":"opensc: Fix of CVE-2026-40528","description":"- CVE-2026-40528: avoid possible buffer overrun when parsing pkcs15-init profile\n  key values","status":"published","published":"2026-06-10T10:44:55Z","modified":"2026-10-26T09:31:10.92051868Z","updated_at":"2026-11-02T15:43:45.445699Z"},{"id":"MGASA-2026-0231","title":"Updated opensc packages fix security vulnerabilities","description":"These packages fix security vulnerabilities:\nCVE-2026-10275, A flaw has been found in OpenSC up to 0.26.1. This\naffects the function test_kpgen_certwrite of the file\nsrc/tools/pkcs11-tool.c of the component pkcs11-tool Key Generation\nModule. This manipulation causes buffer overflow. The attack is possible\nto be carried out remotely. The complexity of an attack is rather high.\nIt is indicated that the exploitability is difficult. The exploit has\nbeen published and may be used. Patch name:\n814f745b3b6d100295f65f1935edd33d520d33ab. It is recommended to apply a\npatch to fix this issue.\nCVE-2026-40528, OpenSC before 0.27.0, fixed in commit 0358817, contains\na stack and heap buffer overrun vulnerability in the do_key_value()\nfunction in src/pkcs15init/profile.c that allows attackers to corrupt\nmemory by supplying a crafted profile configuration file. During\npkcs15-init invocation, a key value entry beginning with '=' followed by\nmore than sizeof(keybuf) characters is copied into keybuf via memcpy\nwithout a length check, causing both stack and heap buffer overruns.\n","status":"published","published":"2026-06-24T05:41:50Z","modified":"2026-06-24T05:45:04.641953614Z","updated_at":"2026-11-02T15:49:43.795591Z"},{"id":"openSUSE-SU-2026:11022-1","title":"opensc-0.27.1-2.1 on GA media","description":"These are all security issues fixed in the opensc-0.27.1-2.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-06-13T00:00:00Z","modified":"2026-06-14T14:00:07.502003685Z","updated_at":"2026-11-02T16:58:38.95195Z"},{"id":"openSUSE-SU-2026:21873-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues:\n\n- CVE-2026-10275: global buffer overflow during key pair generation tests due to missing input validation (bsc#1267246).\n- CVE-2026-40528: stack and heap buffer overrun in the `do_key_value()` function due to missing length check allows for\n  memory corruption via a crafted profile configuration file (bsc#1266963).\n","status":"published","published":"2026-09-17T18:13:08Z","modified":"2026-09-25T18:23:10.526047846Z","updated_at":"2026-11-02T16:58:42.426393Z"},{"id":"SUSE-SU-2026:22103-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues\n\n- CVE-2026-10275: global buffer overflow during key pair generation tests due to missing input validation (bsc#1267246).\n- CVE-2026-40528: stack and heap buffer overrun in the `do_key_value()` function due to missing length check allows for\n  memory corruption via a crafted profile configuration file (bsc#1266963).\n","status":"published","published":"2026-06-15T08:50:16Z","modified":"2026-06-17T18:24:08.456298264Z","updated_at":"2026-11-02T15:54:02.654057Z"},{"id":"SUSE-SU-2026:22139-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues\n\n- CVE-2026-10275: global buffer overflow during key pair generation tests due to missing input validation (bsc#1267246).\n- CVE-2026-40528: stack and heap buffer overrun in the `do_key_value()` function due to missing length check allows for\n  memory corruption via a crafted profile configuration file (bsc#1266963).\n","status":"published","published":"2026-06-16T09:44:47Z","modified":"2026-06-18T18:24:20.01944084Z","updated_at":"2026-11-02T15:54:02.654057Z"},{"id":"SUSE-SU-2026:2657-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues\n\n- CVE-2025-49010: stack-buffer-overflow via crafted smart card or USB device responses (bsc#1261214).\n- CVE-2025-66037: crafted input can cause an out-of-bounds read (bsc#1261218).\n- CVE-2025-66038: improper compact-TLV length validation can lead to crash or unexpected behavior (bsc#1261219).\n- CVE-2025-66215: crafted smart card or USB device can cause a stack-buffer-overflow write (bsc#1261220).\n- CVE-2026-10275: global buffer overflow during key pair generation tests due to missing input validation (bsc#1267246).\n- CVE-2026-40528: stack and heap buffer overrun in the `do_key_value()` function due to missing length check allows for\n  memory corruption via a crafted profile configuration file (bsc#1266963).\n","status":"published","published":"2026-06-26T12:25:06Z","modified":"2026-06-27T08:45:05.168365512Z","updated_at":"2026-11-02T15:54:04.519245Z"},{"id":"SUSE-SU-2026:2697-1","title":"Security update for opensc","description":"This update for opensc fixes the following issues\n\n- CVE-2025-49010: stack-buffer-overflow via crafted smart card or USB device responses (bsc#1261214).\n- CVE-2025-66037: crafted input can cause an out-of-bounds read (bsc#1261218).\n- CVE-2025-66038: improper compact-TLV length validation can lead to crash or unexpected behavior (bsc#1261219).\n- CVE-2025-66215: crafted smart card or USB device can cause a stack-buffer-overflow write (bsc#1261220).\n- CVE-2026-10275: global buffer overflow during key pair generation tests due to missing input validation (bsc#1267246).\n- CVE-2026-40528: stack and heap buffer overrun in the `do_key_value()` function due to missing length check allows for\n  memory corruption via a crafted profile configuration file (bsc#1266963).\n","status":"published","published":"2026-06-30T09:15:07Z","modified":"2026-07-01T09:45:06.022800307Z","updated_at":"2026-11-02T15:54:04.519245Z"}]}}
