Patch tracker / KB5040940

KB5040940: Microsoft SQL Server 2017 for x64-base Security Update (July 2024)

KB5040940 is a High security update for Microsoft SQL Server 2017 for x64-base, released 2024-07-09. It closes 37 CVEs with a maximum CVSS of 8.8. Get it from the Microsoft Update Catalog below, and see where it sits against the rest of the month on the patch tracker.

High
A newer security update for Microsoft SQL Server 2017 for x64-based Systems (GDR) has shipped since this one: KB5101346 (2026-07-14). For cumulative update families the newer package includes these fixes.

Microsoft security update released 2024-07-09. Fixes 37 CVEs.

Download KB5040940Senserva AI read on KB5040940Install guidanceIs it installed?CVEs it fixesChange history

No exploitation is confirmed for the CVEs in this update and the EPSS exploitation probability is currently 1.8%. That can change: CVEs from past updates regularly get exploited months later, which is why deploying on your normal cadence, without exceptions that linger, is what keeps this one boring.

SQL Server updates deploy per instance, usually via the downloaded package or your server patching tool rather than client update rings. The install guidance below covers the options. For the bigger picture: how the Microsoft patching tools fit together, this month's Patch Tuesday summary, and every update ranked by real-world risk.

Deploy this cycle
Fixes 37 CVEs for Microsoft SQL Server 2017 for x64-base. No confirmed in-the-wild exploitation in this set today.
Download KB5040940 from the Microsoft Update Catalog, or deploy via Windows Update, Intune, or WSUS. The full CVE list is below.

Updated July 25, 2026. Data refreshed on every build from MSRC, CISA KEV, and FIRST EPSS.

Download KB5040940

Get the official update for KB5040940. The download and file size for each supported product are on the Microsoft Update Catalog page.

Update summary

Released
2024-07-09
CVEs fixed
37
Max CVSS
8.8
Severity
High

Senserva AI Opinion for KB5040940

Database administrators on SQL Server 2016, 2017, or 2019 face 37 closed CVEs in this July update, including CVE-2024-38088 and CVE-2024-38087, topping out at Severity High, CVSS 8.8. This scale of rollup is unusual and suggests deferred patching should not continue past this cycle. Coordinate downtime carefully since a rollup this large may need a longer maintenance window than typical monthly updates.

Do this: Allocate a longer maintenance window for this large 37-CVE SQL Server update given its scope.

AI-generated from public data, 2026-07-07. Verify against the vendor advisory before acting.

Senserva AI Opinion and rich prompt for KB5040940

Copy this prompt into Claude, ChatGPT, or Copilot. The facts are included, sourced from this page.

Full tracking and change history for KB5040940

Released
2024-07-09
Last changed
2024-07-09
Changes tracked
1

Senserva began recording day-to-day change history on 2026-07-07, and refreshes it several times a day. Release dates are historical where Microsoft publishes them; revision history is tracked from that date forward, so it does not include changes made before then.

Exploitation and severity

Fixes 37 CVEs. Most severe CVSS 8.8 (High). EPSS exploit probability up to 1.8%.

Among the lower half of tracked Microsoft updates by EPSS exploit probability.

What to do

Moderate priority: schedule it in your normal patch cycle. Senserva flags whether KB5040940 is missing on your devices.

Check if KB5040940 is installed

Copy-paste PowerShell: one machine, or your whole fleet in one pass. No output means the update is not installed.

Get-HotFix covers Windows updates. Office, SharePoint, and Exchange server updates show under installed updates in Programs and Features, or check the Update Catalog history.

Writing about KB5040940? Cite this page

Copy-paste for a blog post, forum answer, or internal doc. The link always carries the current risk data.

CVEs fixed by this update

Sorted exploited-first, then by CVSS. Every CVE links to its Senserva page with the full risk facts, references, and a ready-to-paste AI prompt.

CVESeverityCVSSEPSSExploited
CVE-2024-20701High8.81.8%No
CVE-2024-21303High8.81.8%No
CVE-2024-21308High8.81.8%No
CVE-2024-21317High8.81.8%No
CVE-2024-21331High8.81.8%No
CVE-2024-21332High8.81.8%No
CVE-2024-21333High8.81.8%No
CVE-2024-21335High8.81.8%No
CVE-2024-21373High8.81.8%No
CVE-2024-21398High8.81.8%No
CVE-2024-21414High8.81.8%No
CVE-2024-21415High8.81.8%No
CVE-2024-21425High8.81.8%No
CVE-2024-21428High8.81.8%No
CVE-2024-21449High8.81.8%No
CVE-2024-28928High8.81.8%No
CVE-2024-35256High8.81.8%No
CVE-2024-35271High8.81.8%No
CVE-2024-35272High8.81.8%No
CVE-2024-37318High8.81.8%No
CVE-2024-37319High8.81.8%No
CVE-2024-37320High8.81.8%No
CVE-2024-37321High8.81.8%No
CVE-2024-37322High8.81.8%No
CVE-2024-37323High8.81.8%No
CVE-2024-37324High8.81.8%No
CVE-2024-37326High8.81.8%No
CVE-2024-37327High8.81.8%No
CVE-2024-37328High8.81.8%No
CVE-2024-37329High8.81.8%No
CVE-2024-37330High8.81.8%No
CVE-2024-37331High8.81.8%No
CVE-2024-37332High8.81.8%No
CVE-2024-37333High8.81.8%No
CVE-2024-37336High8.81.8%No
CVE-2024-38087High8.81.8%No
CVE-2024-38088High8.81.8%No

Also released in July 2024

The highest-risk updates from the same release:

The full month, summarized: Microsoft Patch Tuesday.

How to install KB5040940

This is a SQL Server update. It deploys per instance:

  • Manual or scripted install of the package from the Update Catalog above, instance by instance, starting with test.
  • Microsoft Update can offer SQL Server updates when the machine opts in to updates for other Microsoft products.
  • Verify afterward by checking the instance build number against the update's target build.

Common questions about KB5040940

Is KB5040940 urgent?

KB5040940 is rated High. Include it in your normal patch cycle unless your environment raises its priority.

How do I download KB5040940?

From the Microsoft Update Catalog (linked on this page), or let Intune, Windows Update for Business, Windows Autopatch, or WSUS deliver it. The catalog page lists the download for each supported product.

How do I deploy KB5040940 with Intune?

Assign a Windows Update ring (quality update policy) to the device groups and the update flows on the ring's deferral schedule. For urgent updates, Intune expedite policies can bypass the ring deferrals. Verify the rollout with update compliance reporting rather than assuming delivery.

Can I ask my own AI about KB5040940?

Yes. This page includes a free, ready-to-paste AI prompt containing KB5040940's key facts: severity, CVE count, exploitation status, and the download link. Copy it into Claude, ChatGPT, or Copilot for a rollout plan; the data is refreshed twice a day (5 AM and 3 PM US Central).

See this and every Microsoft update ranked by real-world risk on the Microsoft Patch Tracker.

Three Free Unlimited Audits: all users, all settings, all patches, all tenants. All you do is register.

Three free audits, across every tenant you manage: 1 scan to find, 2 to review your fixes. It finds:

Includes our advanced Claude MCP: everything you need to run full audits.

Lexicon: the terms on this page
CVE
Common Vulnerabilities and Exposures. A unique ID for one publicly known vulnerability, such as CVE-2025-1234.
KB
Microsoft Knowledge Base article. The identifier for a specific Microsoft update.
KEV
CISA Known Exploited Vulnerabilities. CVEs confirmed exploited in the wild. Fix these first.
CVSS
Common Vulnerability Scoring System. A standardized Severity score from 0 to 10.
EPSS
Exploit Prediction Scoring System. The probability a CVE will be exploited in the next 30 days.
MSRC
Microsoft Security Response Center. Microsoft's Patch Tuesday advisories and KB-to-CVE mapping.
NVD
National Vulnerability Database (NIST). Authoritative CVE metadata and CVSS scores.
Ransomware
The vulnerability is linked to known ransomware activity.
Reference: Microsoft CVE and vulnerability management, the full CVE-to-patch lookup ranked by real-world risk, and the Microsoft patching guide, how Intune, Windows Autopatch, Defender, and Azure Update Manager fit together.
Data notice: this page, the feeds, and the API are provided as is, for informational purposes only, without warranty of any kind. Senserva, LLC does not guarantee the accuracy, completeness, or timeliness of third-party data (MSRC, NVD, CISA KEV, EPSS) and accepts no liability for actions taken based on it; verify against the authoritative vendor advisory before acting. Built daily with Senserva Trustworthy AI. All use of this data is subject to the Senserva EULA.