Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2024-37335

CVE-2024-37335: SQL Server 2016 Azure Connect RCE Flaw

CVE-2024-37335 is a remote code execution vulnerability in Microsoft SQL Server 2016 Azure Connect Feature Pack affecting the Native Scoring component. This article covers technical details, affected versions, security impact, and mitigation.

Published:

CVE-2024-37335 Overview

CVE-2024-37335 is a remote code execution vulnerability in the Microsoft SQL Server Native Scoring feature. The flaw is a heap-based buffer overflow [CWE-122] that an authenticated attacker can trigger over the network to execute arbitrary code in the context of the SQL Server process. Microsoft published the advisory in the September 2024 Patch Tuesday cycle and the CVE covers SQL Server 2016 through SQL Server 2022, plus the SQL 2016 Azure Connect Feature Pack.

Critical Impact

An authenticated attacker with database access can send crafted input to the Native Scoring predictive functions and corrupt heap memory, resulting in remote code execution with the privileges of the SQL Server service account.

Affected Products

  • Microsoft SQL Server 2016 and SQL 2016 Azure Connect Feature Pack
  • Microsoft SQL Server 2017 and 2019 (x64)
  • Microsoft SQL Server 2022 (x64)

Discovery Timeline

  • 2024-09-10 - CVE-2024-37335 published to NVD
  • 2026-08-10 - Last updated in NVD database

Technical Details for CVE-2024-37335

Vulnerability Analysis

The vulnerability resides in the SQL Server Native Scoring functionality, which executes pre-trained machine learning models directly inside the database engine using the PREDICT T-SQL function. Native Scoring parses serialized model data and input tuples in native code for performance. Improper bounds checking during this parsing produces a heap-based buffer overflow.

An attacker who can authenticate to a SQL Server instance and issue a PREDICT statement can supply a crafted model blob or input dataset. The malformed data drives an out-of-bounds write on the heap, corrupting adjacent structures. Successful exploitation yields code execution in the SQL Server process, which typically runs under a dedicated service account with broad access to databases, linked servers, and, in some deployments, the host operating system.

The scope stays unchanged, but confidentiality, integrity, and availability are all fully impacted because the attacker inherits the SQL Server engine's trust boundary.

Root Cause

The root cause is insufficient validation of length or structure fields inside the serialized scoring payload. Native code responsible for materializing model tensors or feature vectors trusts attacker-controlled sizes, resulting in a heap overflow classified as [CWE-122].

Attack Vector

Exploitation requires network reachability to the SQL Server TDS endpoint and valid authenticated credentials with permission to invoke Native Scoring. No user interaction is required. In shared or multi-tenant SQL environments, a low-privileged database user can escalate to code execution on the database host, then pivot laterally using the SQL Server service identity.

No public proof-of-concept exploit is currently published, and the issue is not listed in the CISA KEV catalog. See the Microsoft Security Update Guide for CVE-2024-37335 for vendor detail.

Detection Methods for CVE-2024-37335

Indicators of Compromise

  • SQL Server process (sqlservr.exe) spawning unexpected child processes such as cmd.exe, powershell.exe, or rundll32.exe.
  • Unexpected outbound network connections originating from the SQL Server host or service account.
  • Crashes, access violations, or Watson dumps referencing Native Scoring or PREDICT execution in the SQL Server error log.

Detection Strategies

  • Audit use of the PREDICT T-SQL function and Native Scoring across all databases, especially from low-privileged or application service accounts.
  • Correlate SQL Server crash events with subsequent process creation or credential access activity on the same host.
  • Hunt for anomalous model loading or large binary parameters passed to scoring queries from unexpected client applications.

Monitoring Recommendations

  • Enable SQL Server Audit for EXECUTE operations on scoring-related objects and forward logs to a centralized SIEM.
  • Monitor endpoint telemetry for sqlservr.exe child processes and non-standard DLL loads using behavioral EDR rules.
  • Track patch state of all SQL Server instances against the September 2024 cumulative updates and Azure Connect Feature Pack builds.

How to Mitigate CVE-2024-37335

Immediate Actions Required

  • Apply the September 2024 (or later) SQL Server cumulative update for each affected major version as documented in the Microsoft Security Update Guide.
  • Update the SQL 2016 Azure Connect Feature Pack on any host where it is installed.
  • Restrict PREDICT and Native Scoring permissions to accounts that require the feature, and remove blanket db_owner or public grants.
  • Restrict network access to SQL Server TDS ports so only application tiers and administrators can reach the engine.

Patch Information

Microsoft addressed CVE-2024-37335 in the security updates listed in the Microsoft Security Update Guide for CVE-2024-37335. Patches are available for SQL Server 2016, 2017, 2019, 2022, and the SQL 2016 Azure Connect Feature Pack. Apply the cumulative update matching your branch and restart the SQL Server service.

Workarounds

  • If patching must be deferred, revoke EXECUTE on Native Scoring surfaces and deny use of the PREDICT function to non-essential principals.
  • Isolate SQL Server hosts behind network segmentation so only trusted application subnets can authenticate to the engine.
  • Run SQL Server under a least-privilege service account with no local administrator rights to limit blast radius if the flaw is exploited.
bash
# Restrict PREDICT execution as a temporary hardening measure
# Run against each database exposing Native Scoring models
DENY EXECUTE ON FUNCTION::sys.sp_native_scoring TO [public];
REVOKE EXECUTE ON OBJECT::dbo.YourScoringProc FROM [AppUser];

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

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.