A Critical SQL Server Security Vulnerability You Need to Patch Now
Microsoft has confirmed a serious security vulnerability in SQL Server's Extended Events feature, tracked as CVE-2021-1636, that allows an attacker to execute arbitrary code in the context of the SQL Server process. If you're running SQL Server 2014, 2016, 2017, or 2019 and haven't applied the relevant GDR update, your instance is exposed. This is not a theoretical risk - it's a remotely exploitable code execution vulnerability with a patch already available.
Patch it. Don't wait.
What Is CVE-2021-1636 and Why Does It Matter?
CVE-2021-1636 is a remote code execution vulnerability affecting the Extended Events subsystem in multiple versions of SQL Server. Microsoft's security advisory rates it as important, and the mechanism of exploitation is straightforward enough to be genuinely concerning in production environments.
The flaw exists in how Extended Events processes certain requests. If a specific Extended Event session is active, an authenticated attacker can craft a malicious request that causes SQL Server to execute arbitrary code under the SQL Server service account. In most production environments, that service account carries significant privileges - sometimes more than it should. Exploitation could mean full control of the SQL Server process, access to all databases on the instance, and a foothold into the broader network.
Extended Events is a lightweight performance monitoring framework built into SQL Server. It's widely used by DBAs for query tracing, wait statistics analysis, and troubleshooting. It's also always-on in many environments, which is exactly why this vulnerability matters. You can't simply "turn off" Extended Events without losing critical monitoring capability.
Which SQL Server Versions Are Affected?
The vulnerability affects the following versions:
- SQL Server 2019
- SQL Server 2017
- SQL Server 2016
- SQL Server 2014
Importantly, this isn't just about being on an older version. Even fully patched SQL Server 2019 installations were vulnerable until the specific GDR updates were released. Version currency alone doesn't protect you - patch level matters.
What Patches Are Available?
Microsoft released GDR (General Distribution Release) updates to address this vulnerability. GDRs are security-focused updates that can be applied independently of cumulative updates, which makes them easier to deploy in environments where full CU testing cycles take time.
The specific updates released for CVE-2021-1636 are:
- SQL Server 2019 - CU8 GDR
- SQL Server 2017 - CU22 GDR
- SQL Server 2016 SP2 - CU15 GDR
- SQL Server 2014 SP3 - CU4 GDR
Microsoft also released GDRs for other patch levels within SQL Server 2016, covering instances that hadn't yet moved to SP2. If you're running SQL Server 2016 without SP2, there's a separate GDR path available. Check KB4583468 for the full matrix of affected builds and corresponding patches.
All updates are available through the Microsoft Update Catalog and can be distributed via Windows Update or WSUS in environments with centralised patch management.
How Do You Know If You're Vulnerable?
The first step is confirming your current SQL Server build number. Run this query against each instance:
SELECT
@@SERVERNAME AS ServerName,
@@VERSION AS FullVersion,
SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('Edition') AS Edition;
Compare the returned build number against the patched builds listed in KB4583468. If your build predates the GDR release for your version, you're exposed.
If you're managing multiple instances, this is exactly the kind of check that should be part of a regular SQL Server health review. Running it ad-hoc across 20 or 30 instances manually is time-consuming and error-prone. Centralised patch visibility matters.
Is This the First Extended Events Vulnerability?
No. CVE-2021-1636 is not an isolated incident. In 2018, a similar vulnerability (CVE-2018-8273) was discovered in the Extended Events feature affecting SQL Server 2016 and 2017. That flaw also allowed code execution in the context of the SQL Server service account. The pattern here is worth noting: Extended Events has been a recurring attack surface, and it's a component that's active in most production environments by default.
This history reinforces a broader point about SQL Server security. Patching isn't just about bug fixes and performance improvements. Security vulnerabilities in core SQL Server components are identified regularly, and staying current with GDR and cumulative updates is one of the most effective controls you have.
How Should You Prioritise This Patch?
Remote code execution vulnerabilities affecting production database servers should be treated as urgent. The standard advice to "patch in a test environment first" still applies, but the testing window should be compressed. This isn't a patch that should sit in a backlog for three months.
A practical approach:
- Identify all SQL Server instances in your environment and their current build numbers.
- Cross-reference against the affected builds in KB4583468.
- Download the appropriate GDR from the Microsoft Update Catalog.
- Apply to a non-production instance first and validate connectivity, application behaviour, and Extended Events functionality.
- Schedule production patching with a defined rollback plan.
- Confirm post-patch build numbers match the expected patched versions.
- Document the change for audit and compliance purposes.
In environments with strict change management processes, an emergency change request may be appropriate given the severity of the vulnerability. Most change advisory boards will approve security patches of this nature on an accelerated timeline when the risk is clearly documented.
What About SQL Server 2014?
SQL Server 2014 reached end of extended support in July 2024. If you're still running SQL Server 2014, you're operating on a platform that no longer receives security updates outside of paid Extended Security Updates (ESU) through Microsoft. CVE-2021-1636 had a patch available for SQL Server 2014 at the time of disclosure, but any future vulnerabilities discovered in that version may not receive fixes under standard support.
Running end-of-life SQL Server versions is one of the most common and most serious risks we see in Australian SQL Server environments. It's not just about missing features - it's about accumulating unpatched security debt that grows with every passing month.
Key Takeaways
- CVE-2021-1636 is a remote code execution vulnerability in SQL Server's Extended Events feature affecting SQL Server 2014, 2016, 2017, and 2019. Patch it immediately.
- Microsoft released GDR updates for all affected versions. These are available through the Microsoft Update Catalog and KB4583468.
- Extended Events has been a recurring attack surface - this is the second significant vulnerability in the feature in three years, which underscores the importance of staying current with SQL Server patching.
- Your SQL Server build number determines your exposure. Use the
@@VERSIONorSERVERPROPERTY('ProductVersion')query to confirm your current patch level across all instances. - SQL Server 2014 is end-of-life. If you're still running it, migration or Extended Security Updates should be on your immediate roadmap.
Need Help Assessing Your SQL Server Patch Status?
Keeping across patch levels across multiple SQL Server instances is a real operational challenge, particularly in environments without dedicated DBA resources. DBA Services provides SQL Server health checks that include a full patch level assessment across your environment, identifying instances that are exposed to known vulnerabilities like CVE-2021-1636.
If you'd prefer ongoing coverage, our managed SQL Server support service includes proactive patch management as a core component - so your team isn't scrambling every time Microsoft releases a security advisory.
Contact DBA Services to discuss a SQL Server health check or managed support engagement.
References:
- KB4583468: Security update for SQL Server 2019, 2017, 2016, and 2014 GDR - https://support.microsoft.com/en-us/topic/kb4583468-security-update-for-sql-server-2019-2017-2016-and-2014-gdr-3c5cf5af-3e7e-4df5-96e9-9c5d5dcf42af
- CVE-2021-1636 Microsoft Security Advisory - https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-1636
Need help with your SQL Servers?
Find out what's really going on inside your SQL Server environment.
Our health checks uncover critical misconfigurations in 97% of reviews.