The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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 flaw in OpenSC smart card middleware that triggers out-of-bounds heap reads in X.509/SPKI handling. This article covers the technical details, affected versions, and mitigation strategies.

Published: April 2, 2026

CVE-2025-66037 Overview

CVE-2025-66037 is an out-of-bounds heap read vulnerability in OpenSC, an open source smart card tools and middleware package. Prior to version 0.27.0, feeding a crafted input to the fuzz_pkcs15_reader harness causes OpenSC to perform an out-of-bounds heap read in the X.509/SPKI handling path. Specifically, the sc_pkcs15_pubkey_from_spki_fields() function allocates a zero-length buffer and then reads one byte past the end of that allocation, leading to potential information disclosure or denial of service.

Critical Impact

Physical access exploitation could lead to information disclosure of sensitive heap memory contents, potentially exposing cryptographic keys or authentication tokens stored in adjacent memory regions on smart card systems.

Affected Products

  • OpenSC versions prior to 0.27.0
  • Systems utilizing OpenSC for smart card operations and PKCS#15 processing
  • Applications integrating OpenSC middleware for X.509 certificate handling

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

This vulnerability is classified as CWE-125 (Out-of-Bounds Read), a memory corruption flaw that occurs when the software reads data past the boundary of an allocated memory buffer. The flaw resides in the sc_pkcs15_pubkey_from_spki_fields() function within OpenSC's X.509/SPKI handling code path.

The vulnerability was identified through fuzzing the fuzz_pkcs15_reader harness with crafted inputs. When processing malformed SPKI (Subject Public Key Info) data, the function incorrectly allocates a zero-length buffer but subsequently attempts to read one byte beyond this allocation. This off-by-one read can expose sensitive data from adjacent heap memory or cause application crashes.

The physical attack vector requires an attacker to have direct access to the system where OpenSC is processing smart card data. This limits the attack surface but still poses risks in environments where physical access controls are inadequate or where malicious smart cards could be introduced.

Root Cause

The root cause is improper bounds checking in the sc_pkcs15_pubkey_from_spki_fields() function. When parsing SPKI fields from X.509 certificates or public key structures, the function fails to validate buffer sizes before performing read operations. Specifically, when a zero-length allocation occurs due to malformed input data, the subsequent read operation accesses memory beyond the allocated boundary.

Attack Vector

The vulnerability requires physical access to exploit (attack vector: Physical). An attacker would need to:

  1. Craft a malicious smart card or PKCS#15 data structure containing specifically malformed SPKI fields
  2. Present this malicious input to a system running a vulnerable version of OpenSC
  3. Trigger the parsing of the malformed data through the X.509/SPKI handling path

The exploitation mechanism involves providing crafted input that causes sc_pkcs15_pubkey_from_spki_fields() to allocate a zero-length buffer. When the function attempts to read from this buffer, it accesses heap memory beyond the allocation boundary, potentially leaking sensitive information or causing a crash.

For detailed technical information about the vulnerability mechanism, see the GitHub Security Advisory.

Detection Methods for CVE-2025-66037

Indicators of Compromise

  • Unexpected crashes or segmentation faults in OpenSC-related processes during smart card operations
  • Memory access violations logged in system event logs when processing X.509 certificates
  • Abnormal behavior in applications using OpenSC middleware for PKCS#15 operations

Detection Strategies

  • Monitor for process crashes in OpenSC binaries (opensc-tool, pkcs15-tool, pkcs11-tool) with heap-related error signatures
  • Implement runtime memory sanitization (AddressSanitizer) in development and testing environments to detect out-of-bounds reads
  • Deploy endpoint detection solutions capable of identifying memory corruption exploitation attempts
  • Review application logs for errors related to X.509 certificate parsing or SPKI field processing

Monitoring Recommendations

  • Enable detailed logging for smart card operations and PKCS#15 processing activities
  • Monitor system stability metrics for services utilizing OpenSC middleware
  • Implement file integrity monitoring on OpenSC binaries to detect unauthorized modifications
  • Configure SentinelOne agents to monitor for behavioral anomalies in smart card authentication workflows

How to Mitigate CVE-2025-66037

Immediate Actions Required

  • Upgrade OpenSC to version 0.27.0 or later immediately
  • Audit systems to identify all installations of vulnerable OpenSC versions
  • Restrict physical access to systems running vulnerable OpenSC installations until patched
  • Review smart card authentication logs for any suspicious activity

Patch Information

This vulnerability has been patched in OpenSC version 0.27.0. Organizations should upgrade to this version or later to remediate the vulnerability. The fix addresses the improper bounds checking in the sc_pkcs15_pubkey_from_spki_fields() function to prevent out-of-bounds heap reads.

For patch details and upgrade instructions, refer to the OpenSC Security Advisory and the CVE Wiki Entry.

Workarounds

  • Implement strict physical access controls to systems utilizing OpenSC for smart card operations
  • Consider temporarily disabling smart card authentication on critical systems until patching is complete
  • Deploy endpoint protection solutions to monitor for exploitation attempts
  • Isolate vulnerable systems from untrusted networks and physical access points
bash
# Verify current OpenSC version
opensc-tool --version

# Update OpenSC on Debian/Ubuntu systems
sudo apt update && sudo apt install opensc

# Update OpenSC on RHEL/CentOS systems
sudo yum update opensc

# Verify updated version is 0.27.0 or later
opensc-tool --version

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 Wiki Entry
  • 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
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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