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
| Id | Name |
|---|---|
| CWE-121 | Stack-based Buffer Overflow |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59 | nvd | Patch |
| https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c | nvd | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| opensc_project:opensc | < 0.27.0 | no | nvd | /v1/products/opensc_project/opensc |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| OpenSC/OpenSC | cna_commit, commit | yes | /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