Is Microsoft.Data.SqlClient 2.1 vulnerable?

NuGet · 8 releases from 2.1.0 to 2.1.7 · latest Microsoft.Data.SqlClient is 7.1.2 · checked 18 Nov 2026

No known advisories in the last release

Microsoft.Data.SqlClient 2.1.7, the last 2.1 release, has no known advisories. 2 advisories affect earlier 2.1.x releases, so update to 2.1.7.

Update within 2.1:dotnet add package Microsoft.Data.SqlClient --version 2.1.7

Is your project on an affected Microsoft.Data.SqlClient?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Fixed within 2.1.x, affecting earlier releases

  • HighCVE-2024-0056GHSA-98g6-xh36-x2p79 Jan 2024

    Microsoft.Data.SqlClient and System.Data.SqlClient vulnerable to SQL Data Provider Security Feature Bypass

    Affected
    <2.1.7 · >=3.0.0 <3.1.5 · >=4.0.0 <4.0.5 · >=5.0.0 <5.1.3
    Fixed in
    2.1.7, 3.1.5, 4.0.5, 5.1.3
  • MediumCVE-2022-41064GHSA-8g2p-5pqh-5jmc8 Nov 2022

    .NET Information Disclosure Vulnerability

    Affected
    <1.1.4 · >=2.0.0 <2.1.2
    Fixed in
    1.1.4, 2.1.2

Every Microsoft.Data.SqlClient 2.1.x release

Affected: 2.1.0 to 2.1.6. 2.1.7 is not affected. Latest Microsoft.Data.SqlClient: 7.1.2.

VersionKnown advisories
Microsoft.Data.SqlClient 2.1.7None
Microsoft.Data.SqlClient 2.1.6CVE-2024-0056
Microsoft.Data.SqlClient 2.1.5CVE-2024-0056
Microsoft.Data.SqlClient 2.1.4CVE-2024-0056
Microsoft.Data.SqlClient 2.1.3CVE-2024-0056
Microsoft.Data.SqlClient 2.1.2CVE-2024-0056
Microsoft.Data.SqlClient 2.1.1CVE-2024-0056, CVE-2022-41064
Microsoft.Data.SqlClient 2.1.0CVE-2024-0056, CVE-2022-41064

Which of your client projects are still on Microsoft.Data.SqlClient 2.1?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact Microsoft.Data.SqlClient version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other Microsoft.Data.SqlClient versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the NuGet registry. Refreshed daily.