LiveActive security incident?Get immediate response
CVE Record

CVE-2026-40510: OpenSC < 0.27.0-rc1 Stack Buffer Overflow via piv_process_history() in card-piv.c

OpenSC before 0.27.0-rc1, fixed in commit 3f24f0b, contains a stack buffer overflow vulnerability in piv_process_history() in src/libopensc/card-piv.c that allows physically present attackers to trigger memory corruption by presenting a crafted PIV smart card or USB device returning a URL field longer than 118 bytes in the Key History Object ASN.1 response.

LowCVSS 3.8Not KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

OpenSC has a low-severity memory corruption flaw triggered by a crafted PIV smart card or USB device. An attacker must be physically present and persuade or cause a user to interact with the device. The main business risk is limited endpoint compromise or disruption in environments that use OpenSC for smart-card authentication.

Executive priority

Treat this as a targeted physical-access risk, not an emergency internet-facing exposure. Patch during the next endpoint maintenance cycle, faster for environments relying heavily on PIV smart-card authentication or accepting third-party cards or tokens.

Technical view

CVE-2026-40510 is a CWE-121 stack buffer overflow in OpenSC before 0.27.0-rc1, in piv_process_history() within src/libopensc/card-piv.c. The issue is tied to processing an overlong URL field in the PIV Key History Object ASN.1 response. It is fixed by OpenSC commit 3f24f0b.

Likely exposure

Exposure is most likely on workstations or systems running vulnerable OpenSC builds and interacting with PIV smart cards, tokens, or USB devices. Systems without OpenSC or without PIV smart-card use are unlikely to be exposed based on the provided sources.

Exploitation context

The CVSS vector requires physical access, high attack complexity, and user interaction. The source bundle does not report active exploitation, and KEV status is false. The credible scenario is a physically presented malicious card or USB device, not remote internet exploitation.

Researcher notes

The evidence supports a stack buffer overflow in OpenSC PIV handling, fixed upstream in commit 3f24f0b and described as affecting versions before 0.27.0-rc1. Public sources provided do not establish exploit availability, active exploitation, or broader affected products beyond OpenSC.

Mitigation direction

  • Upgrade OpenSC to 0.27.0-rc1 or a build containing commit 3f24f0b.
  • Check operating-system or package-maintainer advisories for backported OpenSC fixes.
  • Restrict use of untrusted PIV cards, tokens, and USB smart-card devices.
  • Prioritize shared workstations and smart-card authentication endpoints first.

Validation and detection

  • Inventory endpoints and servers with OpenSC installed.
  • Confirm installed OpenSC versions are not earlier than the fixed release or patched build.
  • Identify systems that process PIV smart cards or USB smart-card devices.
  • Review endpoint controls for unauthorized removable smart-card or USB device use.
Prepared
Confidence
high
Sources
5

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
cve · low confidence lookup

CVE-2026-40510 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
4Source 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-40510Attack 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.