{"id":"CVE-2026-40510","state":"PUBLISHED","title":"OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c","description":"OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in piv_process_history() in src/libopensc/card-piv.c that allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device returning a URL field longer than 118 bytes in the Key History Object ASN.1 response.","publishedAt":"2026-05-29T13:26:40.459Z","updatedAt":"2026-07-14T20:00:28.402Z","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-rc1","versionType":"semver"},{"version":"0","status":"affected","lessThan":"3f24f0b48a481a8cf2e46059d8238a283ddc1c13","versionType":"git"}],"repo":"https://github.com/OpenSC/OpenSC"}],"references":["https://github.com/OpenSC/OpenSC/pull/3558","https://github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a283ddc1c13","https://www.vulncheck.com/advisories/opensc-stack-buffer-overflow-via-piv-process-history-in-card-piv-c"],"weaknesses":["CWE-121"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40510.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40510","state":"PUBLISHED","datePublished":"2026-05-29T13:26:40.459Z","dateUpdated":"2026-07-14T20:00:28.402Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-04-13T20:29:02.809Z"},"containers":{"cna":{"title":"OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c","descriptions":[{"lang":"en","value":"OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in piv_process_history() in src/libopensc/card-piv.c that allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device returning a URL field longer than 118 bytes in the Key History Object ASN.1 response."}],"affected":[{"vendor":"OpenSC","product":"OpenSC","packageURL":"pkg:github/OpenSC/OpenSC","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"0.27.0-rc1","versionType":"semver"},{"version":"0","status":"affected","lessThan":"3f24f0b48a481a8cf2e46059d8238a283ddc1c13","versionType":"git"}],"repo":"https://github.com/OpenSC/OpenSC"}],"references":[{"url":"https://github.com/OpenSC/OpenSC/pull/3558","tags":["issue-tracking"]},{"url":"https://github.com/OpenSC/OpenSC/commit/3f24f0b48a481a8cf2e46059d8238a283ddc1c13","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/opensc-stack-buffer-overflow-via-piv-process-history-in-card-piv-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"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-07-14T20:00:28.402Z"},"tags":["x_open-source"],"datePublic":"2026-01-26T00: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-06-01T13:37:05.970355Z","id":"CVE-2026-40510","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-06-01T13:37:24.127Z"}}]}}}