LiveActive security incident?Get immediate response
CVE Record

CVE-2026-40528: OpenSC < 0.27.0 Buffer Overrun in do_key_value() via profile.c

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.

LowCVSS 3.8Not KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

OpenSC before 0.27.0 can mishandle a specially crafted profile configuration file and corrupt memory during pkcs15-init use. The business risk is limited because exploitation requires local or physical access conditions and user interaction, but systems that provision smart cards with shared or externally supplied profiles should prioritize updating.

Executive priority

Treat this as a targeted maintenance fix, not an emergency. Update affected OpenSC deployments during the next security patch cycle, with faster handling for smart-card provisioning systems that process profiles from users, vendors, or shared repositories.

Technical view

The issue is a stack and heap buffer overrun in do_key_value() in src/pkcs15init/profile.c. A key value beginning with '=' and exceeding keybuf length is copied with memcpy without a length check. The CVSS 3.1 score is 3.8, with low confidentiality, integrity, and availability impact.

Likely exposure

Exposure is most likely on endpoints or provisioning systems running OpenSC before 0.27.0 where pkcs15-init processes profile configuration files that could be supplied or influenced by an attacker.

Exploitation context

The provided sources do not show active exploitation, and the CVE is not marked KEV. Exploitation requires a crafted profile configuration file, pkcs15-init invocation, high attack complexity, and user interaction under the published CVSS vector.

Researcher notes

The memory corruption path is tied to profile parsing in pkcs15-init, specifically unchecked copying into keybuf. The sources identify CWE-121 and CWE-122, but do not provide proof of reliable code execution, public exploitation, or broader affected products beyond OpenSC before 0.27.0.

Mitigation direction

  • Upgrade OpenSC to 0.27.0 or a vendor package containing commit 0358817.
  • Restrict who can create, modify, or supply OpenSC profile configuration files.
  • Avoid processing profile files from untrusted sources.
  • Check operating system vendor advisories for backported OpenSC fixes.
  • Prioritize smart-card provisioning hosts before general endpoints.

Validation and detection

  • Inventory systems with OpenSC installed and record package versions.
  • Confirm whether pkcs15-init is used in provisioning workflows.
  • Review OpenSC package changelogs for commit 0358817 or equivalent fix.
  • Audit write access to OpenSC profile configuration locations.
  • Check whether externally supplied profile files are accepted operationally.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-121: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-122: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-40528 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Low
CVSS
3.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
3.8CVSS 3.1LowCVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L0.43.4VulnCheck
1CVSS 4.0LowCVSS:4.0/AV:P/AC:H/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NVulnCheck

Vulnerability scoring details

Base CVSS 4.0 score

1Low
CVSS 4.0 vector shape for CVE-2026-40528Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: 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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
OpenSCOpenSC0, 0affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-121 · source CWE mapping

Stack-based Buffer Overflow

Stack-based Buffer Overflow represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-122 · source CWE mapping

Heap-based Buffer Overflow

Heap-based Buffer Overflow represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.