CVE-2026-40370: Microsoft SQL Server remote code execution via path traversal

CVE-2026-40370 · Severity: high · CVSS 8.8 · Published 2026-05-12

Microsoft SQL Server, a widely used database management system, contains a vulnerability that allows an authorized user to execute malicious code on the server. By manipulating file paths or names, an attacker with basic access can gain full control over the database environment. This could lead to the theft of sensitive customer data, permanent loss of information, or a complete shutdown of database operations.

Technologies: Microsoft SQL Server, Microsoft Sql Server 2016, Microsoft Sql Server 2017, Microsoft Sql Server 2019, Microsoft Sql Server 2022, Microsoft Sql Server 2025. Vendors: Microsoft.

Quick answers

Is CVE-2026-40370 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40370 being exploited in the wild.
How severe is CVE-2026-40370?
High severity, with a CVSS score of 8.8, published 12 May 2026.
Which products and versions are affected?
Microsoft Sql Server 2016 13.0.6300.2 to 13.0.6490.1, 13.0.7000.253 to 13.0.7085.1; Microsoft Sql Server 2017 14.0.1000.169 to 14.0.2110.2, 14.0.3006.16 to 14.0.3530.2; Microsoft Sql Server 2019 15.0.2000.5 to 15.0.2170.1, 15.0.4003.23 to 15.0.4470.1; Microsoft Sql Server 2022 16.0.1000.6 to 16.0.1180.1, 16.0.4003.1 to 16.0.4252.3; and 1 more.
Is there a fix for CVE-2026-40370?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-40370 attacked?
It is attacked over the network, in an operating system.
Am I affected by CVE-2026-40370?
Check whether you run Microsoft SQL Server, Microsoft Sql Server 2016, Microsoft Sql Server 2017 or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A vulnerability exists in Microsoft SQL Server (versions 2016 through 2025) due to improper validation of user-supplied file names or paths (CWE-73/CWE-610). An authenticated attacker with low privileges can exploit this by providing a malicious path to a resource, leading to remote code execution on the underlying server. The attack is conducted over the network and does not require user interaction. Microsoft has released security updates to address this issue across the affected versions.

Affected products

  • Microsoft SQL Server 2016 13.0.6300.2 to 13.0.6490.1, 13.0.7000.253 to 13.0.7085.1
  • Microsoft SQL Server 2017 14.0.1000.169 to 14.0.2110.2, 14.0.3006.16 to 14.0.3530.2
  • Microsoft SQL Server 2019 15.0.2000.5 to 15.0.2170.1, 15.0.4003.23 to 15.0.4470.1
  • Microsoft SQL Server 2022 16.0.1000.6 to 16.0.1180.1, 16.0.4003.1 to 16.0.4252.3
  • Microsoft SQL Server 2025 17.0.1000.7 to 17.0.1115.1, 17.0.4006.2 to 17.0.4040.1

Timeline

  • 2026-05-12: disclosed: Initial publication of the vulnerability advisory.
  • 2026-05-12: advisory: Microsoft released a vendor advisory and security updates.

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.