A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection Platforms. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Read More
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-2025-66037

CVE-2025-66037: OpenSC Use-After-Free Vulnerability

CVE-2025-66037 is a use-after-free vulnerability in OpenSC smart card middleware that causes out-of-bounds heap reads. This article covers the technical details, affected versions prior to 0.27.0, and mitigation.

Updated: May 15, 2026

CVE-2025-66037 Overview

CVE-2025-66037 affects OpenSC, an open source smart card tools and middleware suite. The vulnerability is an out-of-bounds heap read [CWE-125] in the X.509 Subject Public Key Info (SPKI) handling path. The function sc_pkcs15_pubkey_from_spki_fields() allocates a zero-length buffer and then reads one byte past the end of that allocation. Triggering the flaw requires crafted input processed through the fuzz_pkcs15_reader harness, which means physical interaction with a malicious smart card. The issue is patched in OpenSC version 0.27.0.

Critical Impact

A crafted smart card can cause OpenSC to read one byte beyond a zero-length heap allocation, potentially leading to information disclosure or process instability when parsing X.509/SPKI fields.

Affected Products

  • OpenSC versions prior to 0.27.0
  • Systems using OpenSC for PKCS#15 smart card middleware
  • Applications linking against vulnerable OpenSC libraries for SPKI parsing

Discovery Timeline

  • 2026-03-30 - CVE-2025-66037 published to NVD
  • 2026-04-01 - Last updated in NVD database

Technical Details for CVE-2025-66037

Vulnerability Analysis

The vulnerability resides in sc_pkcs15_pubkey_from_spki_fields(), a routine in OpenSC responsible for parsing the SubjectPublicKeyInfo (SPKI) structure of an X.509 certificate or key blob. When the function processes a malformed input, it allocates a buffer of length zero and then proceeds to dereference one byte past the end of that allocation.

Because the read occurs on a zero-length heap allocation, the byte read lies in adjacent heap metadata or neighboring chunk data. Depending on heap layout, this can produce inconsistent behavior, leak adjacent heap contents into downstream parsing logic, or trigger a crash under hardened allocators. The bug is reachable via the fuzz_pkcs15_reader fuzz harness, indicating it can be reproduced deterministically with crafted PKCS#15 reader input.

Root Cause

The root cause is missing length validation before performing a read on an allocated SPKI field buffer. The parser assumes at least one byte of payload exists after allocation, but the allocation size is derived from attacker-controlled length encoding in the DER-encoded SPKI structure. When that length is zero, the subsequent indexed read steps one byte beyond the allocation boundary.

Attack Vector

Exploitation requires physical access. An attacker must present a malicious smart card or equivalent token to a system running vulnerable OpenSC middleware. When OpenSC enumerates the card and parses its certificates or public key objects through PKCS#15, the malformed SPKI field triggers the out-of-bounds read. The flaw can also be reached programmatically by feeding crafted input to the fuzz_pkcs15_reader harness in development or CI environments.

No verified public proof-of-concept exists outside the reported fuzz harness reproducer documented in the GitHub Security Advisory.

Detection Methods for CVE-2025-66037

Indicators of Compromise

  • Unexpected crashes or SIGSEGV events in processes loading opensc-pkcs11.so or invoking pkcs15-tool
  • AddressSanitizer or hardened allocator reports referencing sc_pkcs15_pubkey_from_spki_fields
  • Smart card enumeration failures correlated with insertion of unknown or untrusted cards

Detection Strategies

  • Inventory endpoints with installed OpenSC packages and compare versions against 0.27.0
  • Monitor process telemetry for abnormal terminations of smart card services such as pcscd and OpenSC tools
  • Review build pipelines and CI systems that include the fuzz_pkcs15_reader harness for unpatched OpenSC sources

Monitoring Recommendations

  • Log smart card insertion events and correlate with subsequent application errors
  • Enable heap protection diagnostics (glibc MALLOC_CHECK_, hardened allocators) on systems that parse third-party card data
  • Audit endpoints where users authenticate with smart cards from external or untrusted issuers

How to Mitigate CVE-2025-66037

Immediate Actions Required

  • Upgrade OpenSC to version 0.27.0 or later on all affected endpoints and servers
  • Restrict smart card reader access on shared or kiosk systems to trusted card issuers only
  • Rebuild and redistribute any internal applications statically linked against vulnerable OpenSC versions

Patch Information

The issue is fixed in OpenSC 0.27.0. The upstream advisory and patch details are documented in the OpenSC GitHub Security Advisory GHSA-m58q-rmjm-mmfx and the OpenSC CVE wiki entry. Distribution maintainers should pull the patched release into supported package channels.

Workarounds

  • Disable the OpenSC PKCS#11 module in applications that do not require smart card authentication
  • Stop and disable the pcscd service on systems that do not use smart cards
  • Limit physical access to USB and smart card readers on sensitive endpoints until patches are deployed
bash
# Verify installed OpenSC version and remove if vulnerable
opensc-tool --version

# Debian/Ubuntu
sudo apt update && sudo apt install --only-upgrade opensc opensc-pkcs11

# Fedora/RHEL
sudo dnf upgrade opensc

# Disable pcscd where smart cards are not in use
sudo systemctl disable --now pcscd.service pcscd.socket

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechOpensc

  • SeverityMEDIUM

  • CVSS Score6.8

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125
  • Vendor Resources
  • GitHub Security Advisory

  • GitHub CVE Documentation
  • Related CVEs
  • CVE-2025-49010: OpenSC Buffer Overflow Vulnerability

  • CVE-2025-66038: OpenSC Buffer Overflow Vulnerability

  • CVE-2025-66215: OpenSC Buffer Overflow Vulnerability

  • CVE-2025-24531: OpenSC pam_pkcs11 Auth Bypass Flaw
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