Skip to content

Microsoft.Data.SqlClient installs System.Security.Crytography.Pkcs 9.x.x which is vulnerable #4958

Closed as duplicate

Description

@DataJuggler

Describe the bug

I updated 4 packages, only to still get my packages listed as Vulnerable due to the real issue is Microsoft.Data.SqlClient. A couple of years ago this same thing happened, and I got an email my packages shouldn't have been listed as vulnerable, but it happened again.

VS Solution Explorer shows the error

To reproduce

Create a NuGet package that references the latest Microsoft.Data.SqlClient 7.1.1

Expected behavior

Not listing my NUGet packages as Vulnerable

Further technical details

Microsoft.Data.SqlClient version: (found on the nuGet or Microsoft.Data.SqlClient.dll)
.NET target: .NET 10

Additional context
Issue has been explained.

Activity

  1. added theissue type on Nov 1, 2026
  2. github-actions commented on Nov 1, 2026

    @github-actions

    🔍 Triage Summary

    Check Result
    Issue type Bug
    Environment ⚠️ Partial: received .NET target (.NET 10), SqlClient version (7.1.1, from repro); still missing: SQL Server version, OS, exact warning text (NuGet advisory ID), expected vs actual details beyond "not flagged vulnerable"
    Area Area\Engineering
    Duplicates Potentially related: #4843, #4939
    Regression Inconclusive

    Analysis

    The reporter says packages referencing Microsoft.Data.SqlClient 7.1.1 are flagged as vulnerable because of the transitive dependency System.Security.Cryptography.Pkcs 9.x. This is a dependency-version/NuGet audit problem in package references, not a runtime defect. Severity is likely P2, since it is a supply-chain warning that can break builds with warnings-as-errors.

    Next Steps

    • @DataJuggler, please provide: the exact warning text (NuGet advisory/CVE ID and flagged package version), the output of dotnet list package --include-transitive, the target framework of the consuming project, and OS/SQL Server version if relevant.
    • Review Using a vulnerable version of System.Security.Cryptography.Pkcs (CVE-2026-70162, CVE-2026-84008) #4843 (same package, closed) to check whether the fix shipped in 7.1.1 or whether a newer Pkcs patch version is required.
    • Once confirmed, assign to Copilot coding agent to investigate the System.Security.Cryptography.Pkcs version in Directory.Packages.props and the SqlClient csproj, and bump to the patched version for the net10.0 and net462 targets.

    Note: This triage summary is auto-generated by an AI agent. The analysis and suggestions above have not been verified by a human maintainer. Please treat as preliminary guidance only.

    Generated by SqlClient Issue Auto-Triage for #4958 · copilot · auto · 22.5 AIC · ⌖ 11.6 AIC · ⊞ 7.3K · ◷

  3. ErikEJ commented on Nov 1, 2026

    @ErikEJ
    Contributor

    Did you check existing issues?

    7.1.2 with a fix for this is planned for November 11

  4. DataJuggler commented on Nov 1, 2026

    @DataJuggler
    Author

    I searched, I guess it defaults to IsOpen so I guess I didn't.

    OK, I will check for an update later in the month. Thanks

  5. sugarst commented on Nov 2, 2026

    @sugarst

    Hi maintainers,

    We are also affected by this issue while preparing the next release of
    WatchDog(Layout.WatchDog.NET), an ASP.NET Core logging library.

    Our SQL Server storage package targets both net8.0 and net10.0 and
    references Microsoft.Data.SqlClient 7.1.1.

    Our current project.assets.json resolves:

    Target framework SqlClient System.Security.Cryptography.Pkcs
    net8.0 7.1.1 8.0.1
    net10.0 7.1.1 9.0.18

    Both versions produce NU1902 and NU1903 warnings for:

    For context, our project configuration is:

    <Project Sdk="Microsoft.NET.Sdk">
      <PropertyGroup>
        <TargetFrameworks>net8.0;net10.0</TargetFrameworks>
      </PropertyGroup>
      <ItemGroup>
        <PackageReference Include="Microsoft.Data.SqlClient" Version="7.1.1" />
      </ItemGroup>
    </Project>

    We understand that adding direct references to patched Pkcs versions is
    a workaround. However, as a library publisher, we would prefer to upgrade
    SqlClient to a servicing release that declares secure dependency minimums,
    rather than maintain additional overrides in our package.

    I noticed that #4846 is closed and associated with the 7.1.2 milestone.

    Could you please clarify:

    1. Which published SqlClient version includes these dependency fixes?
    2. Does the fix cover both the .NET 8 and .NET 9 dependency groups
      (the latter is selected by our net10.0 target)?
    3. If the servicing package is not yet available, is there an estimated
      release date for 7.1.2?

    We have observed the dependency audit warnings; we have not demonstrated
    an exploitable path through SqlClient.

    Thank you!

  6. ErikEJ commented on Nov 2, 2026

    @ErikEJ
    Contributor

    @sugarst 6.1.8 includes the fixes, and 7.1.2 is planned for November 11 as I mentioned just above. The fix covers .NET 8 and .NET 9 dependency (.NET 10 support is coming in 8.0.0, planned for early November)

  7. TonyValenti commented on Nov 7, 2026

    @TonyValenti

    Thanks for the update! We're watching for this update as well for the same reasons.

  8. mdaigle commented on Nov 12, 2026

    @mdaigle
    Contributor

    We've merged fixes for this in each supported version band. Please look out for releases today.

  9. moved this from To triage to Done in SqlClient Boardon Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions