Skip to content
Fencer Vulns
low 3.8

CVE-2026-40528 json

OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c

published 2026-05-29 5 mo ago modified 2026-07-21 3 mo ago also EUVD-2026-33320

cvss
3.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 8%
public exploits
0
none known

Summary

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.

Patch / fix

  • OpenSC OpenSC 0.27.0
  • opensc SLES for SAP 15 SP6, SLES 15 SP6-LTSS, SLE Module for Basesystem 15 SP7 0.22.0-150600.11.11.1
  • opensc SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +8 more 0.22.0-150400.3.17.1
  • opensc Linux Micro 6.1 0.24.0-slfo.1.1_4.1
  • opensc Linux Micro 6.0 0.24.0-6.1

suse advisories SUSE-SU-2026:2697-1SUSE-SU-2026:2657-1SUSE-SU-2026:22139-1SUSE-SU-2026:22103-1

  • opensc openSUSE Leap 16.0 0.26.1-160000.5.1
  • opensc openSUSE Tumbleweed 0.27.1-2.1

opensuse advisories openSUSE-SU-2026:21873-1openSUSE-SU-2026:11022-1

  • opensc Azure Linux 3.0 0.27.0-1

azure linux advisories AZL-89147

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-40528 updated cvss 6.7

opensc: OpenSC: Memory corruption via crafted profile configuration file

  • Red Hat Enterprise Linux 7 opensc Red Hat Enterprise Linux 8 opensc Red Hat Enterprise Linux 9 opensc Red Hat Enterprise Linux 10 opensc
    affected: no fix available “Fix deferred”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
5 mo ago

Exploit prediction

0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 4.0 1.0 CVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
CNA 3.1 3.8 CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
CNA 4.0 1.0 CVSS: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
NVD 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected products

  • OpenSC OpenSC

Classification

Weakness
  • CWE-121 Stack-based Buffer Overflow
  • CWE-122 Heap-based Buffer Overflow

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.