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
    • 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-40370

CVE-2026-40370: SQL Server RCE Vulnerability

CVE-2026-40370 is a remote code execution vulnerability in SQL Server caused by external control of file name or path. Authorized attackers can exploit this flaw to execute code over a network. This article covers impact, versions, and mitigation.

Published: May 17, 2026

CVE-2026-40370 Overview

CVE-2026-40370 is a remote code execution vulnerability in Microsoft SQL Server caused by external control of file name or path [CWE-73]. An authorized attacker can manipulate file path inputs to execute arbitrary code over the network. The flaw requires low privileges and no user interaction, making it exploitable by any account with valid credentials to the database.

Microsoft published the advisory on May 12, 2026. The vulnerability affects SQL Server instances accessible over the network and can be leveraged to compromise confidentiality, integrity, and availability of the host system.

Critical Impact

An authenticated attacker can execute arbitrary code on SQL Server hosts by controlling file path parameters, leading to full database server compromise.

Affected Products

  • Microsoft SQL Server (refer to the Microsoft advisory for specific build numbers)
  • SQL Server instances exposed to network-accessible authenticated users
  • Applications relying on affected SQL Server versions for backend storage

Discovery Timeline

  • 2026-05-12 - CVE-2026-40370 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-40370

Vulnerability Analysis

The vulnerability stems from improper validation of file name or path inputs processed by SQL Server. An authenticated attacker submits crafted path values that the server resolves without adequate restriction. This allows the attacker to reference attacker-controlled files or trigger loading of unintended resources during database operations.

The attack vector is the network, and exploitation requires only low-privilege credentials. No user interaction is needed, which lowers the operational barrier for adversaries who have obtained any valid SQL Server login. Successful exploitation results in code execution within the SQL Server process context.

The Exploit Prediction Scoring System currently lists this CVE with a low near-term exploitation probability, but authenticated RCE flaws in database engines have historically attracted post-compromise exploitation by ransomware and intrusion operators.

Root Cause

The root cause is classified as [CWE-73] External Control of File Name or Path. SQL Server accepts file path parameters from authenticated users and uses them in privileged file operations without enforcing sufficient canonicalization or allow-list controls. The trust boundary between user-supplied path data and the server's file access logic is not enforced.

Attack Vector

Exploitation requires a valid SQL Server login with permission to invoke functionality that accepts a file path parameter. The attacker submits a malicious path referencing a remote share, symbolic link, or specially crafted local file. SQL Server processes the path, leading to code execution under the privileges of the SQL Server service account.

The vulnerability is exploitable in scenarios where SQL Server is reachable from internal networks, business partner networks, or where credential theft has occurred. Compromised application accounts or stolen developer credentials are common entry points.

Verified proof-of-concept code is not currently available. Refer to the Microsoft CVE-2026-40370 Update for technical details.

Detection Methods for CVE-2026-40370

Indicators of Compromise

  • Unexpected outbound SMB or UNC path connections originating from the SQL Server service account
  • SQL Server error log entries referencing file access failures on unusual paths
  • Spawning of cmd.exe, powershell.exe, or other child processes from sqlservr.exe
  • Unusual file read or write operations performed by the SQL Server process outside standard data directories

Detection Strategies

  • Monitor process creation events where sqlservr.exe is the parent process and the child is a shell or scripting interpreter
  • Audit SQL Server logins and track usage of stored procedures and functions that accept file path arguments
  • Inspect network telemetry for SMB connections from database servers to non-corporate destinations
  • Correlate authentication events with subsequent file system operations on the SQL Server host

Monitoring Recommendations

  • Enable SQL Server audit logging for BACKUP, RESTORE, BULK INSERT, and OPENROWSET operations
  • Forward Windows Security and Sysmon logs to a centralized SIEM for behavioral correlation
  • Alert on any modification to SQL Server configuration that enables xp_cmdshell or external file access features
  • Baseline normal file path arguments used by applications and flag deviations

How to Mitigate CVE-2026-40370

Immediate Actions Required

  • Apply the Microsoft security update referenced in the Microsoft CVE-2026-40370 Update advisory
  • Inventory all SQL Server instances and prioritize patching of internet-adjacent or business-critical servers
  • Rotate credentials for any SQL Server accounts that may have been exposed to untrusted users
  • Restrict network access to SQL Server using firewall rules and network segmentation

Patch Information

Microsoft has released a security update for affected SQL Server versions. Administrators must consult the Microsoft CVE-2026-40370 Update advisory for build-specific patch identifiers and apply the cumulative update or security-only rollup that corresponds to the deployed SQL Server edition.

Workarounds

  • Revoke unnecessary permissions on stored procedures and functions that accept file path arguments
  • Disable xp_cmdshell and other extended procedures that are not required for business operations
  • Enforce least privilege on the SQL Server service account and remove local administrator rights where possible
  • Limit SQL Server access to trusted application accounts and block direct user logins where feasible
bash
# Example: disable xp_cmdshell on SQL Server
sqlcmd -S <server> -E -Q "EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell', 0; RECONFIGURE;"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechMicrosoft Sql Server

  • SeverityHIGH

  • CVSS Score8.8

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-73
  • Technical References
  • Microsoft CVE-2026-40370 Update
  • Related CVEs
  • CVE-2026-33120: Microsoft SQL Server 2016 RCE Vulnerability

  • CVE-2020-0618: Microsoft SQL Server SSRS RCE Vulnerability

  • CVE-2025-49717: Microsoft SQL Server 2019 RCE Vulnerability

  • CVE-2024-21332: Microsoft SQL Server 2016 RCE 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