A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40510

CVE-2026-40510: OpenSC Buffer Overflow Vulnerability

CVE-2026-40510 is a stack buffer overflow vulnerability in OpenSC affecting versions before 0.27.0-rc1. Attackers with physical access can exploit crafted PIV smart cards to trigger memory corruption.

Published: June 4, 2026

CVE-2026-40510 Overview

CVE-2026-40510 is a stack buffer overflow vulnerability in OpenSC, an open source toolkit for working with smart cards and cryptographic tokens. The flaw resides in the piv_process_history() function within src/libopensc/card-piv.c. A physically present attacker can trigger memory corruption by presenting a crafted Personal Identity Verification (PIV) smart card or USB device that returns a URL field longer than 118 bytes in the Key History Object ASN.1 response. The issue is classified under [CWE-121: Stack-based Buffer Overflow] and affects OpenSC versions prior to 0.27.0-rc1. The vulnerability was fixed in commit 3f24f0b.

Critical Impact

Physical attackers presenting a malicious PIV smart card or USB token can corrupt stack memory in OpenSC, potentially leading to crashes or limited memory tampering on the host workstation.

Affected Products

  • OpenSC versions before 0.27.0-rc1
  • The vulnerable code path: piv_process_history() in src/libopensc/card-piv.c
  • Systems consuming PIV smart cards or USB tokens via OpenSC libraries

Discovery Timeline

  • 2026-05-29 - CVE-2026-40510 published to the National Vulnerability Database (NVD)
  • 2026-06-03 - Last updated in NVD database

Technical Details for CVE-2026-40510

Vulnerability Analysis

The vulnerability exists in the PIV card handling logic of OpenSC. When OpenSC processes a Key History Object returned by a PIV-compatible smart card, the piv_process_history() function parses ASN.1-encoded fields, including a URL field that points to off-card certificate storage. The function copies this URL into a fixed-size stack buffer without enforcing length boundaries. When the URL field exceeds 118 bytes, the copy overruns the buffer, corrupting adjacent stack memory.

Exploitation requires physical access. The attacker must connect a crafted smart card or USB device that emulates a PIV applet returning the malicious ASN.1 response. User interaction is also required, as a victim must initiate card processing through an application that links against OpenSC. The impact is limited to memory corruption on the local host, with no network attack surface.

Root Cause

The root cause is missing bounds validation on attacker-controlled ASN.1 data. The piv_process_history() routine trusts the length of the URL field returned by the card and copies it into a stack-allocated buffer sized for typical PIV responses. The Key History Object specification does not enforce a hard URL length limit at the parser level, allowing oversized fields to overflow the destination buffer [CWE-121].

Attack Vector

The attack vector is physical. An attacker fabricates a smart card or USB device that returns an oversized URL in the Key History Object during PIV enumeration. When the victim inserts the device and an OpenSC-based application reads card metadata, piv_process_history() is invoked and the overflow triggers. The vulnerability is most relevant to environments where users routinely accept untrusted smart cards or removable cryptographic tokens. See the VulnCheck Security Advisory for additional technical context.

Detection Methods for CVE-2026-40510

Indicators of Compromise

  • Unexpected crashes or stack corruption errors in processes linking libopensc (for example, pkcs11-tool, opensc-tool, browser PKCS#11 modules)
  • Insertion of unknown PIV smart cards or USB cryptographic tokens on hosts running OpenSC
  • Anomalous PC/SC service activity following insertion of a removable smart card device

Detection Strategies

  • Inventory hosts running OpenSC and identify installed versions earlier than 0.27.0-rc1
  • Monitor application crash telemetry for segmentation faults or stack-smashing protector aborts within OpenSC-linked binaries
  • Audit USB and smart card insertion events through endpoint logging and correlate with subsequent process failures

Monitoring Recommendations

  • Enable kernel and system audit logging for USB device attachment events
  • Collect application crash dumps from workstations that interact with smart cards
  • Track package versions for opensc across managed endpoints using configuration management tooling

How to Mitigate CVE-2026-40510

Immediate Actions Required

  • Upgrade OpenSC to version 0.27.0-rc1 or later, which includes the fix in commit 3f24f0b
  • Restrict the use of untrusted or unknown PIV smart cards and USB cryptographic tokens on managed endpoints
  • Apply USB device control policies to limit smart card readers and tokens to approved hardware

Patch Information

The vulnerability is fixed in OpenSC commit 3f24f0b48a481a8cf2e46059d8238a283ddc1c13, merged via GitHub Pull Request #3558. The corresponding commit is available at the OpenSC GitHub repository. Administrators should update to 0.27.0-rc1 or any subsequent release that includes this commit.

Workarounds

  • Disable PIV card support in OpenSC configuration where the feature is not required
  • Enforce physical security controls limiting access to workstations with smart card readers
  • Use endpoint device control policies to block unknown USB-class smart card devices
bash
# Verify installed OpenSC version on Linux
opensc-tool --version

# Example: upgrade OpenSC on Debian/Ubuntu after distribution package update
sudo apt-get update && sudo apt-get install --only-upgrade opensc

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechOpensc

  • SeverityLOW

  • CVSS Score1.0

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS 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/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
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityLow
  • AvailabilityLow
  • CWE References
  • CWE-121
  • Technical References
  • VulnCheck Security Advisory
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Pull Request #3558
  • Related CVEs
  • CVE-2026-40528: OpenSC Buffer Overflow Vulnerability

  • CVE-2026-10275: OpenSC Buffer Overflow Vulnerability

  • CVE-2025-49010: OpenSC Buffer Overflow Vulnerability

  • CVE-2025-66038: OpenSC Buffer Overflow Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English