VulnarioBlogSQL Server vulnerabilities
Microsoft SQL Server Vulnerabilities: The 10 Most Critical SQL Server Security Bugs (CVEs)
Microsoft SQL Server vulnerabilities are security flaws in Microsoft SQL Server that attackers can abuse to steal data, take over a server or interrupt a service. Microsoft SQL Server is Microsoft's relational database. The National Vulnerability Database (NVD) lists 108 CVEs for SQL Server, 1 of them rated critical, and none were published in the last 12 months. CISA lists 3 of them in its Known Exploited Vulnerabilities (KEV) catalog, which means attackers have used them against real systems.
This guide lists the 10 most critical SQL Server security bugs, with the CVE number, CVSS score, affected versions and what to do about each one. It also covers SQL Server security basics and a free way to be told about the next SQL Server CVE as soon as it is published.
Key takeaways
- 3 CVEs are in CISA's KEV catalog, so attackers have exploited them in the wild.
- 1 SQL Server CVE is rated critical (CVSS v3), and 0 new ones were published in the last 12 months.
- The newest CVE in this guide is CVE-2023-38169, published Aug 8, 2023.
- You can monitor SQL Server for free. Vulnario emails you when a new CVE matches your version and the rest of your stack.
How we ranked these SQL Server CVEs
We ranked CVEs first by whether CISA lists them as exploited, then by CVSS score (v3 scores before the older v2 scale, which is marked when used), then by publication date (newest first). When a technology has several product entries in NVD, we combined them and removed duplicates. This favors the bugs that matter most in practice, so the guide is a list of the most critical flaws we found, not a complete history.
Every CVE number, score, date and affected version below comes from the NVD record and the CISA KEV catalog, checked on Nov 3, 2026. Scores can change when NVD reanalyzes a record, so open the linked record if you need the current value.
The 10 most critical SQL Server CVEs at a glance
| # | CVE | CVSS | Published | Type | CISA KEV |
|---|---|---|---|---|---|
| 1 | CVE-2020-0618 | 8.8 High | 2020-02-11 | Microsoft SQL Server Reporting Services Remote Code Execution | Yes (ransomware use known) |
| 2 | CVE-2019-1068 | 8.8 High | 2019-07-15 | Microsoft SQL Server Remote Code Execution | Yes |
| 3 | CVE-2012-1856 | 8.8 High | 2012-08-15 | Microsoft Office MSCOMCTL.OCX Remote Code Execution | Yes |
| 4 | CVE-2018-8273 | 9.8 Critical | 2018-08-15 | Out-of-bounds write | No |
| 5 | CVE-2023-38169 | 8.8 High | 2023-08-08 | Use after free | No |
| 6 | CVE-2023-21705 | 8.8 High | 2023-02-14 | Remote code execution | No |
| 7 | CVE-2023-21713 | 8.8 High | 2023-02-14 | Insecure deserialization | No |
| 8 | CVE-2021-1636 | 8.8 High | 2021-01-12 | SQL injection | No |
| 9 | CVE-2016-7249 | 8.8 High | 2016-11-10 | Permissions and privileges | No |
| 10 | CVE-2016-7250 | 8.8 High | 2016-11-10 | Permissions and privileges | No |
Each SQL Server CVE explained
1. CVE-2020-0618: Microsoft SQL Server Reporting Services Remote Code Execution
- What NVD says
- A remote code execution vulnerability exists in Microsoft SQL Server Reporting Services when it incorrectly handles page requests, aka 'Microsoft SQL Server Reporting Services Remote Code Execution Vulnerability'.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2012; 2014; 2016
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
2. CVE-2019-1068: Microsoft SQL Server Remote Code Execution
- What NVD says
- A remote code execution vulnerability exists in Microsoft SQL Server when it incorrectly handles processing of internal functions, aka 'Microsoft SQL Server Remote Code Execution Vulnerability'.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2014
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
3. CVE-2012-1856: Microsoft Office MSCOMCTL.OCX Remote Code Execution
- What NVD says
- The TabStrip ActiveX control in the Common Controls in MSCOMCTL.OCX in Microsoft Office 2003 SP3, Office 2003 Web Components SP3, Office 2007 SP2 and SP3, Office 2010 SP1, SQL Server 2000 SP4, SQL Server 2005 SP4, SQL Server 2008 SP2, SP3, R2, R2 SP1, and R2 SP2, Commerce Server 2002 SP4, Commerce Server 2007 SP2, Commerce Server 2009 Gold and R2, Host Integration Server 2004 SP1, Visual FoxPro 8.0 SP1, Visual…
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2000; 2005; 2008
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
4. CVE-2018-8273: Out-of-bounds write
- What NVD says
- A buffer overflow vulnerability exists in the Microsoft SQL Server that could allow remote code execution on an affected system, aka "Microsoft SQL Server Remote Code Execution Vulnerability." This affects Microsoft SQL Server.
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2016; 2017
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
5. CVE-2023-38169: Use after free
- What NVD says
- Microsoft SQL OLE DB Remote Code Execution Vulnerability
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing no privileges and user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2019; 2022
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
6. CVE-2023-21705: Remote code execution
- What NVD says
- Microsoft SQL Server Remote Code Execution Vulnerability
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2012; 2014; 2016; 2017
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
7. CVE-2023-21713: Insecure deserialization
- What NVD says
- Microsoft SQL Server Remote Code Execution Vulnerability
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2012; 2014; 2016; 2017
- What to do
- Apply the vendor's security update for your release and restart the service. See the vendor advisory (opens in a new tab).
8. CVE-2021-1636: SQL injection
- What NVD says
- Microsoft SQL Elevation of Privilege Vulnerability
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2012; 2014; 2016; 2017
- What to do
- Apply the vendor's security update for your release and restart the service.
9. CVE-2016-7249: Permissions and privileges
- What NVD says
- Microsoft SQL Server 2016 does not properly perform a cast of an unspecified pointer, which allows remote authenticated users to gain privileges via unknown vectors, aka "SQL RDBMS Engine Elevation of Privilege Vulnerability."
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2016
- What to do
- Apply the vendor's security update for your release and restart the service.
10. CVE-2016-7250: Permissions and privileges
- What NVD says
- Microsoft SQL Server 2014 SP1, 2014 SP2, and 2016 does not properly perform a cast of an unspecified pointer, which allows remote authenticated users to gain privileges via unknown vectors, aka "SQL RDBMS Engine Elevation of Privilege Vulnerability."
- How it can be attacked
- Can be exploited remotely over the network with low attack complexity, needing low privileges and no user interaction. It has high impact on confidentiality, integrity and availability.
- Affected versions
- 2014; 2016
- What to do
- Apply the vendor's security update for your release and restart the service.
SQL Server security checklist
- Never expose the database port to the internet; allow only the application servers.
- Use strong, unique credentials and least-privilege accounts for each application.
- Apply minor and security releases on a regular cadence, after testing.
- Encrypt connections with TLS and encrypt backups.
- Restrict or remove admin tools you do not need.
- Test restoring from backup, not only creating backups.
Where you run SQL Server matters as much as how you patch it. Whether your site lives on a VPS, a dedicated server or shared hosting (opens in a new tab), check who is responsible for updating SQL Server: on most plans the operating system and applications are yours to patch unless the plan says otherwise.
Your stack is bigger than SQL Server. A flaw anywhere in the chain can be the way in, so also review our guides to Windows Server vulnerabilities, Microsoft IIS vulnerabilities and .NET vulnerabilities.
How to get alerted about new SQL Server vulnerabilities
NVD received 0 new SQL Server CVEs in the last twelve months, and critical ones can be exploited within days. Reading advisories by hand is easy to forget, so most teams automate it. You have three practical options:
- Follow the vendor's announcements and your distribution's security list. They are accurate but cover only one product and you read them manually.
- Query the NVD feed yourself. It is complete and needs scripting, filtering and a mail or chat integration to maintain.
- Use a stack-based alert service. You pick your technologies once and receive an email when a matching CVE appears.
Vulnario is the third option, and it is free to start. It scans the National Vulnerability Database, the CISA KEV catalog and GitHub Security Advisories every hour. You choose SQL Server and the rest of your stack, confirm your email with a code, and the alerts begin. Each email includes the CVE number, the CVSS score, a marker when CISA lists the flaw as actively exploited, the attack vector, a patch or advisory link and a suggested time frame to fix it.
- Free: all technologies, alerts grouped at most every 12 hours.
- Pro ($29/month): alerts are sent on the next hourly scan, so you hear about a new CVE up to 12 hours earlier.
Related security guides
Few stacks run SQL Server alone. These guides cover the technologies it is most often deployed with.
- Windows Server vulnerabilities: Windows Server is Microsoft's server operating system.
- Microsoft IIS vulnerabilities: Microsoft IIS is the web server built into Windows Server.
- .NET vulnerabilities: .NET (including ASP.NET Core) is Microsoft's application development platform.
- Apache Cassandra vulnerabilities: Apache Cassandra is a distributed NoSQL database built for scale and availability.
- CouchDB vulnerabilities: Apache CouchDB is a document-oriented NoSQL database with an HTTP API.
- Elasticsearch vulnerabilities: Elasticsearch is a distributed search and analytics engine.
Frequently asked questions about SQL Server vulnerabilities
What are the most critical SQL Server vulnerabilities?
Based on NVD scores and CISA's exploited-vulnerability catalog, the most critical SQL Server CVEs include CVE-2020-0618 (CVSS 8.8), CVE-2019-1068 (CVSS 8.8), CVE-2012-1856 (CVSS 8.8). The guide above ranks the 10 most critical with affected versions and fixes.
Have SQL Server vulnerabilities been exploited in real attacks?
Yes. CISA's Known Exploited Vulnerabilities (KEV) catalog lists 3 SQL Server CVEs, including CVE-2020-0618, CVE-2019-1068, CVE-2012-1856. Treat these as the highest priority to patch.
How many vulnerabilities does SQL Server have?
As of Nov 3, 2026 the National Vulnerability Database lists 108 CVEs for SQL Server, with 1 rated critical by CVSS v3. 0 were published in the previous twelve months.
How can I get alerted when a new SQL Server CVE is published?
Add SQL Server to a service that watches the National Vulnerability Database, CISA KEV and GitHub Security Advisories. Vulnario does this for free: choose SQL Server and the rest of your stack, verify your email, and you receive an alert when a new CVE matches. Free alerts are grouped at most every 12 hours, and Pro sends them on the next hourly scan.
Is SQL Server secure?
SQL Server is as secure as its patch level. NVD published 0 new SQL Server CVEs in the last twelve months, so running a current, supported release and applying security updates promptly is the most effective protection.
What is CVE-2020-0618?
CVE-2020-0618 is a high SQL Server vulnerability with a CVSS score of 8.8, published Feb 11, 2020. A remote code execution vulnerability exists in Microsoft SQL Server Reporting Services when it incorrectly handles page requests, aka 'Microsoft SQL Server Reporting Services Remote Code Execution Vulnerability'.
Sources
- National Vulnerability Database (NVD) (opens in a new tab), CVE records, CVSS scores and CPE counts, checked Nov 3, 2026.
- CISA Known Exploited Vulnerabilities (KEV) catalog (opens in a new tab), checked Nov 3, 2026.
This article is informational and not a substitute for your own risk assessment. CVSS scores and affected versions may change when NVD updates a record.