CVE-2026-40528: OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c
Vulnerability summary
CVE-2026-40528 is a high (CVSS 7.8) Stack-based Buffer Overflow vulnerability in opensc_project opensc. EPSS estimates a 0.19% chance of exploitation in the next 30 days, higher than 8.7% of scored vulnerabilities.
Not severe (CVSS 1, physical access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 7 · Related 6Timeline
- 29-05-2026PublishedVulnerability first disclosed.
- 14-07-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 2 sources · 2 versions- NVDNIST1.0LowCVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- CVE.orgCNA3.8LowCVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LDiffers
EPSS trend
Probability
0.19%
Chance of exploitation in the next 30 days
Percentile
9%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.19% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: physical access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Suse2 products
- opensc&distro=SUSE Linux Enterprise Server 12 SP5-LTSS< 0.13.0-3.42.1
- opensc&distro=SUSE Linux Enterprise Server LTSS Extended Security 12 SP5< 0.13.0-3.42.1
Opensc1 product
- opensc< 0.27.0 | < 0358817ec74aeca654f83e7709c7720b14c5db59
Opensc_project1 product
- opensc< 0.27.0
3 vendors · 4 products
References
6 links- www.vulncheck.com/advisories/opensc-buffer-overrun-in-do-key-value-via-profile-cThird Party Advisory