Buffer overflow in Opensc
CVE-2026-40528
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.
Vulnerability class: Buffer Overflow
Published · last modified .
CVSS v3 metric
CVSS v3 base score 3.8 (Low). Vector: CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L.
EPSS exploit prediction
EPSS: 0.002 (8.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 8th percentile — 8.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.002 · newest: 0.002 · change: +0.000
Affected products
- Opensc — versions 0
- Opensc Project
Weakness classification (CWE)
References
- github.com/OpenSC/OpenSC/commit/0358817ec74aeca654f83e7709c7720b14c5db59 (Patch, patch)
- www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-c (Third Party Advisory, third-party-advisory)
Frequently asked questions
- What is CVE-2026-40528?
- CVE-2026-40528 is a low-severity vulnerability in Opensc, classified under Stack-based Buffer Overflow. CVSS score: 3.8/10. Published 2026-05-29.
- How severe is CVE-2026-40528?
- Low severity. CVSS v3 base score is 3.8 out of 10.