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-40528

CVE-2026-40528: OpenSC Buffer Overflow Vulnerability

CVE-2026-40528 is a stack and heap buffer overflow flaw in OpenSC before version 0.27.0 that allows attackers to corrupt memory through crafted profile files. This article covers technical details, affected versions, and mitigation.

Published: June 4, 2026

CVE-2026-40528 Overview

CVE-2026-40528 is a stack and heap buffer overrun vulnerability in OpenSC versions before 0.27.0. The flaw resides in the do_key_value() function within src/pkcs15init/profile.c. When pkcs15-init parses a crafted profile configuration file, a key value entry beginning with = followed by more than sizeof(keybuf) characters is copied into keybuf through memcpy without a length check. This results in corruption of both stack and heap memory regions. The issue is tracked under CWE-121: Stack-based Buffer Overflow and was fixed in commit 0358817.

Critical Impact

An attacker who supplies a malicious profile configuration file can corrupt memory during pkcs15-init invocation, potentially affecting confidentiality, integrity, and availability of the smartcard initialization process.

Affected Products

  • OpenSC versions before 0.27.0
  • Systems invoking pkcs15-init with attacker-controlled profile files
  • Smartcard tooling distributions bundling vulnerable OpenSC builds

Discovery Timeline

  • 2026-05-29 - CVE-2026-40528 published to NVD
  • 2026-06-03 - Last updated in NVD database

Technical Details for CVE-2026-40528

Vulnerability Analysis

The vulnerability resides in the profile parser used by OpenSC's pkcs15-init tool. OpenSC reads profile configuration files to determine how to initialize PKCS#15 structures on smartcards. The do_key_value() function in src/pkcs15init/profile.c handles key value entries within these profile files.

When a key value entry begins with the = character, the parser treats the following characters as raw key material. The function then copies the supplied bytes into a fixed-size stack buffer named keybuf using memcpy. The copy operation does not validate that the source length is less than or equal to sizeof(keybuf). Supplying more than sizeof(keybuf) bytes overruns both the stack buffer and adjacent heap allocations associated with the parsing context.

The physical attack vector and required user interaction limit remote exploitation, but local users or operators who load untrusted profiles are exposed. See the VulnCheck Advisory on Buffer Overrun for additional analysis.

Root Cause

The root cause is a missing length validation before invoking memcpy. The parser trusts attacker-controlled input length from the profile file and copies bytes into a fixed-size destination without bounds checking, violating safe memory copy practices outlined in [CWE-121].

Attack Vector

An attacker crafts a malicious profile configuration file containing a key value entry starting with = followed by an oversized byte sequence. When an administrator or automated tooling invokes pkcs15-init and references the crafted profile, the overrun executes during parsing. Exploitation requires physical or local access and user interaction to load the malicious profile.

No verified proof-of-concept code is publicly available. Refer to the upstream GitHub Commit Update for the precise input handling pattern that triggers the overrun.

Detection Methods for CVE-2026-40528

Indicators of Compromise

  • Unexpected crashes or aborts of the pkcs15-init process during smartcard provisioning
  • Profile configuration files containing key value entries that begin with = followed by abnormally long byte sequences
  • Core dumps referencing do_key_value or profile.c in OpenSC binaries

Detection Strategies

  • Inventory installed OpenSC versions across endpoints and compare against 0.27.0 to identify vulnerable hosts
  • Scan profile directories used by pkcs15-init for files containing oversized =-prefixed key value entries
  • Monitor process telemetry for pkcs15-init invocations referencing profile paths outside trusted locations

Monitoring Recommendations

  • Log all pkcs15-init executions, including the profile path argument and invoking user
  • Alert on crashes of OpenSC binaries that produce segmentation faults or stack corruption signatures
  • Track file integrity of profile configuration files in /etc/opensc or equivalent paths

How to Mitigate CVE-2026-40528

Immediate Actions Required

  • Upgrade OpenSC to version 0.27.0 or later, which contains commit 0358817
  • Restrict write access to profile configuration directories to trusted administrators only
  • Avoid invoking pkcs15-init with profile files sourced from untrusted users or locations

Patch Information

The fix is available in OpenSC commit 0358817ec74aeca654f83e7709c7720b14c5db59. Rebuild OpenSC from the patched source or install a distribution package containing version 0.27.0 or later. Refer to the GitHub Commit Update for the exact source changes.

Workarounds

  • Set restrictive filesystem permissions on profile directories so only root or designated administrators can modify them
  • Validate profile configuration files before use by inspecting key value entries for excessive length
  • Disable or remove pkcs15-init on systems that do not require PKCS#15 initialization workflows
bash
# Configuration example: restrict OpenSC profile directory permissions
chown -R root:root /usr/share/opensc/
chmod -R 755 /usr/share/opensc/
find /usr/share/opensc/ -name '*.profile' -exec chmod 644 {} \;

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 Advisory on Buffer Overrun
  • Vendor Resources
  • GitHub Commit Update
  • Related CVEs
  • CVE-2026-40510: 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