# CVE-2026-40528: OpenSC \< 0.27.0 Buffer Overrun in do\_key\_value() via profile.c

- Priority: **Routine**
- Reason: Not severe (CVSS 1, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-05-29 · Modified: 2026-07-14
- Aliases: SUSE-SU-2026:5464-1
- Record: https://cvemate.com/vulnerability/CVE-2026-40528 · JSON: https://cvemate.com/vulnerability/CVE-2026-40528/json

## 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.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.188%, percentile 8.741%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- opensc\_project opensc: \< 0.27.0
- opensc opensc: \< 0.27.0 \| \< 0358817ec74aeca654f83e7709c7720b14c5db59
- suse opensc&distro=SUSE Linux Enterprise Server 12 SP5-LTSS (SUSE Linux Enterprise): \< 0.13.0-3.42.1
- suse opensc&distro=SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 (SUSE Linux Enterprise): \< 0.13.0-3.42.1

## References

- <https://github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59>
- <https://www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40528>
- <https://www.suse.com/support/update/announcement/2026/suse-su-20265464-1/>
- <https://bugzilla.suse.com/1266963>
- <https://www.suse.com/security/cve/CVE-2026-40528>

---

Data as of 2026-12-05T13:27:28.845Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
