{"id":"CVE-2026-40528","state":"PUBLISHED","title":"OpenSC < 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.","publishedAt":"2026-05-29T13:38:11.831Z","updatedAt":"2026-07-14T20:00:40.951Z","severity":{"score":1,"label":"Low","version":"4.0","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","source":"VulnCheck"},"assigner":"VulnCheck","products":["OpenSC OpenSC"],"affected":[{"vendor":"OpenSC","product":"OpenSC","packageURL":"pkg:github/OpenSC/OpenSC","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"0.27.0","versionType":"semver"},{"version":"0","status":"affected","lessThan":"0358817ec74aeca654f83e7709c7720b14c5db59","versionType":"git"}],"repo":"https://github.com/OpenSC/OpenSC"}],"references":["https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59","https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c"],"weaknesses":["CWE-121","CWE-122"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40528.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40528","state":"PUBLISHED","datePublished":"2026-05-29T13:38:11.831Z","dateUpdated":"2026-07-14T20:00:40.951Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-04-13T20:29:02.810Z"},"containers":{"cna":{"title":"OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"OpenSC","product":"OpenSC","packageURL":"pkg:github/OpenSC/OpenSC","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"0.27.0","versionType":"semver"},{"version":"0","status":"affected","lessThan":"0358817ec74aeca654f83e7709c7720b14c5db59","versionType":"git"}],"repo":"https://github.com/OpenSC/OpenSC"}],"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"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"PHYSICAL","attackComplexity":"HIGH","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"LOW","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"LOW","baseScore":1,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"PHYSICAL","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"LOW","availabilityImpact":"LOW","version":"3.1","baseSeverity":"LOW","baseScore":3.8,"vectorString":"CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-121","lang":"en","description":"Stack-based Buffer Overflow","type":"CWE"},{"cweId":"CWE-122","lang":"en","description":"Heap-based Buffer Overflow","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-14T20:00:40.951Z"},"tags":["x_open-source"],"datePublic":"2026-03-30T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:opensc_project:opensc:*:*:*:*:*:*:*:*","versionEndExcluding":"0.27.0"},{"vulnerable":true,"criteria":"cpe:2.3:a:opensc_project:opensc:*:*:*:*:*:*:*:*"}]}]}],"credits":[{"lang":"en","value":"Nicholas Carlini of Anthropic","type":"finder"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"vulncheck"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-29T13:58:10.279206Z","id":"CVE-2026-40528","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-29T13:58:18.086Z"}}]}}}