CVE-2026-40370 SQL Server Remote Code Execution Vulnerability

High 8.8 Published Updated

An authorized attacker can execute arbitrary code remotely via external control of file names or paths in Microsoft SQL Server.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-40370?

CVE-2026-40370 is a high-severity path traversal vulnerability in Microsoft Sql Server 2016, published on 12 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

External control of file name or path in SQL Server allows an authorized attacker to execute code over a network.

Weakness: CWE-610, CWE-73

Which versions are affected by CVE-2026-40370?

It affects 5 products.

Products include Microsoft Sql Server 2016, Microsoft Sql Server 2017, Microsoft Sql Server 2019, Microsoft Sql Server 2022, Microsoft Sql Server 2025.

How do I fix CVE-2026-40370?

No fix has been published for CVE-2026-40370 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-40370 being exploited?

There is no known exploitation of CVE-2026-40370 in the wild and no public exploit code.

All Microsoft Sql Server 2016 vulnerabilities

Sources

Also known as GHSA-c4mg-2cmw-c72r.

Is CVE-2026-40370 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free