SecurityContext

CVE-2026-40528: OpenSC - Buffer Overflow

  • Cve: CVE-2026-40528
  • Name: OpenSC - Buffer Overflow
  • 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.
  • Impact: Attackers can corrupt memory, potentially leading to application crash or arbitrary code execution.
  • Remediation: Update to version 0.27.0 or later.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution, denial_of_service
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.8
  • Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.00188
  • Epss percentile: 0.08344
  • Assignee: [email protected]
  • Published at: 2026-05-29T14:16:26Z
  • Age in days: 179
  • Modified at: 2026-07-21T12:10:00Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-40528
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-121Stack-based Buffer Overflow

References

UrlSourceTags
https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59nvdPatch
https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-cnvdThird Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
opensc_project:opensc< 0.27.0nonvd/v1/products/opensc_project/opensc

Projects

RepositoryLink kindsIndexedUrl
OpenSC/OpenSCcna_commit, commityes/v1/repositories/OpenSC/OpenSC

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts