CVE-2024-0056 — Microsoft.Data.SqlClient
HIGHCVE-2024-0056 is a high-severity (CVSS 8.7) CWE-319 vulnerability in Microsoft.Data.SqlClient. A fix is available for Microsoft.Data.SqlClient — see the affected versions and patch details below.
Microsoft.Data.SqlClient and System.Data.SqlClient vulnerable to SQL Data Provider Security Feature Bypass
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-0056.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
Microsoft.Data.SqlClient.NETSystem.Data.SqlClient.NETMicrosoft.Data.SqlClient.NETMicrosoft.Data.SqlClient.NETMicrosoft.Data.SqlClientReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects NuGet packages — download data is not available via public APIs for these ecosystems.
Description
Microsoft.Data.SqlClient and System.Data.SqlClient SQL Data Provider Security Feature Bypass Vulnerability
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| .NETNuGet | Microsoft.Data.SqlClient | all versions | 2.1.7dotnet add package Microsoft.Data.SqlClient --version 2.1.7 |
| .NETNuGet | System.Data.SqlClient | all versions | 4.8.6dotnet add package System.Data.SqlClient --version 4.8.6 |
| .NETNuGet | Microsoft.Data.SqlClient | ≥ 3.0.0&&< 3.1.5 | 3.1.5dotnet add package Microsoft.Data.SqlClient --version 3.1.5 |
| .NETNuGet | Microsoft.Data.SqlClient | ≥ 4.0.0&&< 4.0.5 | 4.0.5dotnet add package Microsoft.Data.SqlClient --version 4.0.5 |
| .NETNuGet | Microsoft.Data.SqlClient | ≥ 5.0.0&&< 5.1.3 | 5.1.3dotnet add package Microsoft.Data.SqlClient --version 5.1.3 |
Affected Products
.netmicrosoft.net frameworkmicrosoftmicrosoft.data.sqlclientmicrosoftsql servermicrosoftsystem.data.sqlclientmicrosoftvisual studio 2022microsoftDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for Microsoft.Data.SqlClient, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update Microsoft.Data.SqlClient to 2.1.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-0056 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This flaw allows attackers to execute an adversary-in-the-middle (AiTM) attack, potentially enabling the theft of authentication credentials even when the connection is encrypted with protocols like TLS. This security lapse could lead to unauthorized access to sensitive databases, raising concerns about data breaches…
Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2024-0056 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| .NET Core on Red Hat Enterprise Linux | rh-dotnet60-dotnet-0:6.0.126-1.el7_9 | RHSA-2024:0255 |
| Red Hat Enterprise Linux 8 | dotnet8.0-0:8.0.101-1.el8_9 | RHSA-2024:0150 |
| Red Hat Enterprise Linux 8 | dotnet7.0-0:7.0.115-1.el8_9 | RHSA-2024:0157 |
| Red Hat Enterprise Linux 8 | dotnet6.0-0:6.0.126-1.el8_9 | RHSA-2024:0158 |
| Red Hat Enterprise Linux 9 | dotnet7.0-0:7.0.115-1.el9_3 | RHSA-2024:0151 |
| Red Hat Enterprise Linux 9 | dotnet8.0-0:8.0.101-1.el9_3 | RHSA-2024:0152 |
| Red Hat Enterprise Linux 9 | dotnet6.0-0:6.0.126-1.el9_3 | RHSA-2024:0156 |
Frequently Asked Questions
Is CVE-2024-0056 in your dependencies?
Find it across NuGet, including transitive dependencies.