Vulnerabilities in pkg:nuget/System.Data.SqlClient

PACKAGE
Advisory Identifier: GHSA-98g6-xh36-x2p7
Advisory Summary

CVE-2024-0056 is a HIGH (CVSS 8.7) microsoft.data.sqlclient and system.data.sqlclient vulnerable to vulnerability (CWE-319: Cleartext Transmission of Sensitive Information) affecting Microsoft.Data.SqlClient libraries in the NuGet ecosystem. The issue involves microsoft.data.sqlclient and system.data.sqlclient vulnerable to sql data provider security feature bypass. Remediation is available by upgrading affected packages to version 2.1.7, 4.8.6, 3.1.5, 4.0.5, 5.1.3.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/System.Data.SqlClient

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/System.Data.SqlClient. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-98g6-xh36-x2p7 CVE-2024-0056 HIGH Microsoft.Data.SqlClient and System.Data.SqlClient vulnerable to SQL Data Provider Security Feature Bypass
GHSA-8g2p-5pqh-5jmc CVE-2022-41064 MODERATE .NET Information Disclosure Vulnerability

CVE-2024-0056 at a Glance

CVE Identifier CVE-2024-0056
GHSA Identifier GHSA-98g6-xh36-x2p7
Severity HIGH
CVSS v3.1 Base Score 8.7
CWE Classification CWE-319: Cleartext Transmission of Sensitive Information
Affected Product Microsoft.Data.SqlClient
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 8.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-0056

To remediate this vulnerability, upgrade all affected Microsoft.Data.SqlClient dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Microsoft.Data.SqlClient fixed: 2.1.7
Upgrade Microsoft.Data.SqlClient to 2.1.7
System.Data.SqlClient fixed: 4.8.6
Upgrade System.Data.SqlClient to 4.8.6
Microsoft.Data.SqlClient fixed: 3.1.5
Upgrade Microsoft.Data.SqlClient to 3.1.5
Microsoft.Data.SqlClient fixed: 4.0.5
Upgrade Microsoft.Data.SqlClient to 4.0.5
Microsoft.Data.SqlClient fixed: 5.1.3
Upgrade Microsoft.Data.SqlClient to 5.1.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Microsoft.Data.SqlClient

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-0056, inspect your project dependencies for Microsoft.Data.SqlClient:

inspect dependencies for Microsoft.Data.SqlClient

Analyze the terminal output to locate any version of Microsoft.Data.SqlClient in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-319: Cleartext Transmission of Sensitive Information, where the product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. In Microsoft.Data.SqlClient, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Microsoft.Data.SqlClient and System.Data.SqlClient SQL Data Provider Security Feature Bypass Vulnerability

CVE-2024-0056 Affected Microsoft.Data.SqlClient Versions

5 component(s)
Fixed Versions:
2.1.74.8.63.1.54.0.55.1.3
Product / Package Ecosystem Affected Versions Fixed Version
Microsoft.Data.SqlClient
NuGet
< 2.1.7
2.1.7
System.Data.SqlClient
NuGet
< 4.8.6
4.8.6
Microsoft.Data.SqlClient
NuGet
≥ 3.0.0
< 3.1.5
3.1.5
Microsoft.Data.SqlClient
NuGet
≥ 4.0.0
< 4.0.5
4.0.5
Microsoft.Data.SqlClient
NuGet
≥ 5.0.0
< 5.1.3
5.1.3

References

Frequently Asked Questions

What is CVE-2024-0056?
CVE-2024-0056 is a security vulnerability in Microsoft.Data.SqlClient involving Microsoft.Data.SqlClient and System.Data.SqlClient vulnerable to SQL Data Provider Security Feature Bypass under CWE-319: Cleartext Transmission of Sensitive Information.
Which Microsoft.Data.SqlClient versions are affected?
Affected versions include releases prior to 2.1.7, 4.8.6, 3.1.5, 4.0.5, 5.1.3 across affected packages: Microsoft.Data.SqlClient, System.Data.SqlClient.
What version fixes CVE-2024-0056?
Upgrading to 2.1.7, 4.8.6, 3.1.5, 4.0.5, 5.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Microsoft.Data.SqlClient affected?
Yes, Microsoft.Data.SqlClient is affected in releases prior to 2.1.7, 3.1.5, 4.0.5, 5.1.3. Upgrade your dependency to 2.1.7, 3.1.5, 4.0.5, 5.1.3 or later.
Is System.Data.SqlClient affected?
Yes, System.Data.SqlClient is affected in releases prior to 4.8.6. Upgrade your dependency to 4.8.6 or later.
What is the CVSS score of CVE-2024-0056?
CVE-2024-0056 has a CVSS v3.1 base score of 8.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2024-0056?
CVE-2024-0056 is classified under CWE-319: Cleartext Transmission of Sensitive Information (The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.).
How can I check NuGet dependencies for CVE-2024-0056?
Run the dependency tree command: 'inspect dependencies for Microsoft.Data.SqlClient'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-98g6-xh36-x2p7",
  "modified" : "2024-05-31T20:35:56Z",
  "published" : "2024-01-09T18:30:27Z",
  "aliases" : [ "CVE-2024-0056" ],
  "summary" : "Microsoft.Data.SqlClient and System.Data.SqlClient vulnerable to SQL Data Provider Security Feature Bypass ",
  "details" : "Microsoft.Data.SqlClient and System.Data.SqlClient SQL Data Provider Security Feature Bypass Vulnerability",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Data.SqlClient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.Data.SqlClient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.8.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Data.SqlClient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.1.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Data.SqlClient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Data.SqlClient"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-0056"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/announcements/issues/292"
  }, {
    "type" : "WEB",
    "url" : "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-0056"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-319" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-16T19:13:48Z",
    "nvd_published_at" : "2024-01-09T18:15:46Z"
  }
}