CVE-2024-37966 Overview
CVE-2024-37966 is an information disclosure vulnerability in the Native Scoring feature of Microsoft SQL Server. The flaw stems from an out-of-bounds read condition [CWE-125] within the affected database engine components. An authenticated attacker with low privileges can send a crafted query over the network to trigger the read past allocated memory. Successful exploitation exposes sensitive information from the SQL Server process memory. The vulnerability affects SQL Server 2017, 2019, and 2022 on x64 platforms. Microsoft rates the issue with a CVSS 3.1 base score of 7.1 and issued patches through its September 2024 security update cycle.
Critical Impact
An authenticated attacker can read memory contents of the SQL Server process, potentially exposing credentials, query data, and other sensitive information stored in server memory.
Affected Products
- Microsoft SQL Server 2017 (x64)
- Microsoft SQL Server 2019 (x64)
- Microsoft SQL Server 2022 (x64)
Discovery Timeline
- 2024-09-10 - CVE-2024-37966 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-37966
Vulnerability Analysis
The vulnerability resides in the SQL Server Native Scoring capability, which executes machine learning model predictions directly inside the database engine using the PREDICT T-SQL function. Native Scoring reads serialized model data and input tuples to compute prediction results without invoking an external runtime. The affected code path performs a memory read that extends beyond the bounds of an allocated buffer when processing specific inputs.
An authenticated attacker who can submit T-SQL statements to the target server can trigger the boundary violation. Because the read occurs inside the sqlservr.exe process, disclosed bytes may contain fragments of other sessions, cached query plans, credential material, or data pages held in the buffer pool. The vulnerability has network attack reach and requires low-complexity interaction, but does require valid database credentials or an established session.
The integrity of stored data is not affected. Availability is only partially impacted, as malformed inputs can cause the scoring operation to fail. The primary consequence is confidentiality loss through memory disclosure.
Root Cause
The root cause is an out-of-bounds read [CWE-125] in the input parsing or model deserialization logic within Native Scoring. Missing or insufficient bounds validation allows a request to reference memory outside the intended buffer, and the engine returns that memory content as part of the scoring result or error data. See the Microsoft CVE-2024-37966 Advisory for vendor detail.
Attack Vector
Exploitation requires network access to the SQL Server TDS endpoint and an authenticated login with permission to execute PREDICT or otherwise invoke Native Scoring. The attacker submits crafted model or input payloads through a standard SQL client session. No user interaction on the server is required, and no elevated privileges are needed beyond a standard authenticated database user.
The vulnerability manifests when the Native Scoring code path processes attacker-controlled inputs. See the vendor advisory for further technical detail; no verified public proof-of-concept code is available.
Detection Methods for CVE-2024-37966
Indicators of Compromise
- Repeated failed or malformed PREDICT T-SQL invocations from the same login or client IP within a short interval.
- Unusual result payloads returned from Native Scoring calls, including binary blobs that do not match expected model output schemas.
- Elevated error rates in ERRORLOG referencing scoring, serialization, or access violations inside sqlservr.exe.
Detection Strategies
- Enable SQL Server Audit to capture EXECUTE events against Native Scoring functions and correlate with login source addresses.
- Baseline normal PREDICT usage per application account and alert on deviations in query frequency or payload size.
- Monitor Extended Events sessions for error_reported events tied to scoring operations that indicate boundary faults.
Monitoring Recommendations
- Forward SQL Server error logs and audit events to a centralized SIEM or data lake for cross-session correlation.
- Track authentication anomalies against SQL logins that hold EXECUTE rights on scoring objects.
- Review privilege assignments quarterly to confirm which principals can call PREDICT and other machine learning surfaces.
How to Mitigate CVE-2024-37966
Immediate Actions Required
- Apply the Microsoft September 2024 cumulative update for the affected SQL Server 2017, 2019, or 2022 build immediately.
- Inventory all SQL Server instances that expose Native Scoring or the PREDICT function to identify exposure.
- Restrict EXECUTE permissions on Native Scoring functions to the minimum set of application service accounts.
- Enforce network segmentation so SQL Server TDS endpoints are not reachable from untrusted networks.
Patch Information
Microsoft released fixes as part of the September 2024 Patch Tuesday cycle. Administrators must install the cumulative update or security update that corresponds to their SQL Server major version and branch. Refer to the Microsoft CVE-2024-37966 Advisory for the exact build numbers and download packages for each supported release.
Workarounds
- Revoke EXECUTE on the PREDICT function from roles that do not require machine learning inference.
- Disable Native Scoring workloads on database instances that do not use the feature until patching is complete.
- Rotate any credentials or secrets that may have been present in server memory if exploitation is suspected.
# Configuration example: revoke PREDICT execution from public role
REVOKE EXECUTE ON OBJECT::sys.sp_execute_external_script FROM public;
REVOKE EXECUTE ON DATABASE::YourDb FROM PredictUsersRole;
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

