CVE-2024-21347 Overview
CVE-2024-21347 is a remote code execution vulnerability in the Microsoft Open Database Connectivity (ODBC) Driver. The flaw stems from a heap-based buffer overflow [CWE-122] in the ODBC driver component shipped with Windows client and server operating systems. An attacker who successfully exploits this vulnerability can execute arbitrary code in the context of the user invoking the ODBC connection. Exploitation requires user interaction, such as connecting to a malicious database server or processing an attacker-controlled connection string. Microsoft published the advisory on February 13, 2024, and addressed the issue across supported versions of Windows 10, Windows 11, and Windows Server.
Critical Impact
Successful exploitation enables remote code execution with high impact to confidentiality, integrity, and availability when a user connects to an attacker-controlled ODBC data source.
Affected Products
- Microsoft Windows 10 (versions 1507, 1607, 1809, 21H2, 22H2)
- Microsoft Windows 11 (versions 21H2, 22H2, 23H2)
- Microsoft Windows Server 2008, 2012, 2016, 2019, 2022, and 2022 23H2
Discovery Timeline
- 2024-02-13 - CVE-2024-21347 published to the National Vulnerability Database
- 2024-02-13 - Microsoft releases security update via MSRC advisory
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2024-21347
Vulnerability Analysis
The vulnerability resides in the Microsoft ODBC Driver, a system component used by applications to communicate with database management systems through a standardized API. The defect is classified as a heap-based buffer overflow under [CWE-122]. When the driver parses certain attacker-controlled input during connection handling or query processing, it writes data beyond the boundaries of a heap-allocated buffer. The corruption can be steered to overwrite adjacent heap metadata or function pointers, leading to arbitrary code execution in the host process.
Exploitation is not trivial. The attack requires the victim to initiate a connection to a malicious data source or open a crafted file that triggers ODBC processing. Because the ODBC driver runs in the context of the calling application, code execution inherits the privileges of that process.
Root Cause
The root cause is insufficient bounds checking on attacker-influenced fields processed by the ODBC driver. The driver allocates a fixed or improperly sized heap buffer and copies untrusted data without enforcing the destination length, corrupting the heap.
Attack Vector
The attack vector is network-based but requires user interaction. A typical exploitation scenario involves an attacker hosting a malicious database server and convincing a user to connect with an ODBC-enabled application. The malicious server returns crafted responses that trigger the heap overflow in the client-side driver.
No public proof-of-concept exploit code is available for CVE-2024-21347 at the time of writing. The vulnerability mechanism is described in prose because no verified exploitation samples have been released. Refer to the Microsoft Security Update CVE-2024-21347 advisory for vendor-provided technical details.
Detection Methods for CVE-2024-21347
Indicators of Compromise
- Unexpected child processes spawned by applications loading odbc32.dll or other ODBC driver libraries
- Outbound connections from desktop applications to unfamiliar database server endpoints over TDS, MySQL, or PostgreSQL protocols
- Crashes or abnormal terminations of processes that interact with ODBC data sources, indicating failed exploitation attempts
Detection Strategies
- Hunt for process injection or shellcode patterns originating from processes that have recently loaded ODBC driver modules
- Monitor for new or modified ODBC Data Source Name (DSN) entries in the registry under HKLM\SOFTWARE\ODBC and HKCU\SOFTWARE\ODBC
- Correlate network telemetry showing client connections to attacker-controlled database servers with subsequent suspicious process activity
Monitoring Recommendations
- Enable command-line and module-load auditing on endpoints to capture ODBC driver invocations by uncommon parent applications
- Track Windows Update compliance to confirm the February 2024 cumulative update is deployed across all affected systems
- Alert on PowerShell or scripting hosts initiating ODBC connections, which is uncommon in normal business workflows
How to Mitigate CVE-2024-21347
Immediate Actions Required
- Apply the February 2024 Microsoft security update for all affected Windows client and server versions
- Inventory applications that use the Microsoft ODBC Driver and prioritize patching systems where users connect to external data sources
- Restrict outbound database protocol traffic from user endpoints to only sanctioned, internal database servers
Patch Information
Microsoft released a security update addressing CVE-2024-21347 on February 13, 2024. Patch details and download links are available in the Microsoft Security Update CVE-2024-21347 advisory. Administrators should deploy the corresponding monthly cumulative update for each affected Windows version.
Workarounds
- Block outbound connections from end-user workstations to untrusted database server ports such as 1433, 3306, and 5432 at the network perimeter
- Train users to avoid opening unsolicited connection files, including .odc, .udl, and .dsn attachments from untrusted sources
- Where patching is delayed, remove or disable unused ODBC drivers and DSN entries to reduce the attack surface
For full mitigation, refer to the vendor advisory for configuration guidance specific to each affected Windows release.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

