{"id":"CVE-2026-40528","published":"2026-05-29T13:38:11Z","modified":"2026-07-14T20:00:40Z","title":"OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c","vendor":"OpenSC","product":"OpenSC","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":3.8,"severity":"LOW","version":"3.1","vector":"CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00188,"percentile":0.08557,"provenance":"source"},"cwes":[{"id":"CWE-121","name":"Stack-based Buffer Overflow"},{"id":"CWE-122","name":"Heap-based Buffer Overflow"}],"references":[{"url":"https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c","tags":["third-party-advisory"]}],"priority":{"score":4.4,"factors":[{"name":"EPSS percentile","points":1.71},{"name":"CVSS severity","points":2.66}]},"vendorSlug":"opensc","affectedVersions":[{"vendor":"OpenSC","product":"OpenSC","versions":["< 0.27.0","< 0358817ec74aeca654f83e7709c7720b14c5db59"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-29T13:58:10.279206Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-33320","exploited":false,"provenance":"source"}}