OpenSC up to 0.26.x Profile src/pkcs15init/profile.c do_key_value key stack-based overflow
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.1 | $0-$5k | 0.00 |
Summary
A vulnerability marked as critical has been reported in OpenSC up to 0.26.x. The impacted element is the function do_key_value of the file src/pkcs15init/profile.c of the component Profile Handler. This manipulation of the argument key causes stack-based overflow.
This vulnerability is handled as CVE-2026-40528. It is feasible to perform the attack on the physical device. There is not any exploit available.
It is suggested to upgrade the affected component.
Details
A vulnerability has been found in OpenSC up to 0.26.x and classified as problematic. Affected by this vulnerability is the function do_key_value of the file src/pkcs15init/profile.c of the component Profile Handler. The manipulation of the argument key with an unknown input leads to a stack-based overflow vulnerability. The CWE definition for the vulnerability is CWE-121. A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function). As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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.
The weakness was released by Nicholas Carlini as 0358817ec74aeca654f83e7709c7720b14c5db59. It is possible to read the advisory at github.com. This vulnerability is known as CVE-2026-40528 since 04/13/2026. The exploitation appears to be difficult. Attacking locally is a requirement. The exploitation doesn't need any form of authentication. Technical details of the vulnerability are known, but there is no available exploit.
The vulnerability scanner Nessus provides a plugin with the ID 321651 (Linux Distros Unpatched Vulnerability : CVE-2026-40528), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 0.27.0 eliminates this vulnerability. Applying the patch 0358817ec74aeca654f83e7709c7720b14c5db59 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (321651) and CERT Bund (WID-SEC-2026-1755). Be aware that VulDB is the high quality source for vulnerability data.
Affected
- Open Source OpenSC
Product
Name
Version
License
Website
- Product: https://github.com/OpenSC/OpenSC/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 5.2VulDB Meta Temp Score: 5.1
VulDB Base Score: 3.9
VulDB Temp Score: 3.8
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 7.8
NVD Vector: 🔒
CNA Base Score: 3.8
CNA Vector (VulnCheck): 🔒
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Stack-based overflowCWE: CWE-121 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒
Physical: Yes
Local: Yes
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 321651
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-40528
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: OpenSC 0.27.0
Patch: 0358817ec74aeca654f83e7709c7720b14c5db59
Timeline
04/13/2026 CVE reserved05/29/2026 Advisory disclosed
05/29/2026 VulDB entry created
06/20/2026 VulDB entry last update
Sources
Product: github.comAdvisory: 0358817ec74aeca654f83e7709c7720b14c5db59
Researcher: Nicholas Carlini
Status: Confirmed
CVE: CVE-2026-40528 (🔒)
GCVE (CVE): GCVE-0-2026-40528
GCVE (VulDB): GCVE-100-367231
CERT Bund: WID-SEC-2026-1755 - OpenSC: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff
Entry
Created: 05/29/2026 17:20Updated: 06/20/2026 15:27
Changes: 05/29/2026 17:20 (82), 06/02/2026 06:39 (7), 06/07/2026 05:29 (11), 06/20/2026 15:27 (2)
Complete: 🔍
Cache ID: 216::103
Submit
Duplicate
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.