Skip to content

Using a vulnerable version of System.Security.Cryptography.Pkcs (CVE-2026-70162, CVE-2026-84008) #4843

Closed
3 of 3 issues completed

Description

@jeffska

Two recent CVEs (CVE-2026-70162, CVE-2026-84008) are being flagged because of the dependency on version 9.0.18 of System.Security.Cryptography.Pkcs. Messages from Github Advanced security:

#626 Microsoft Security Advisory CVE-2026-70162 - .NET Denial of Service Vulnerability (CVE-2026-70162)
...contains a reference to an insecure NuGet package 'system.security.cryptography.pkcs 9.0.18'. Recommendation: Upgrade System.Security.Cryptography.Pkcs from 9.0.18 to 9.0.21 to fix the vulnerability.
#627 Microsoft Security Advisory CVE-2026-84008 - .NET Denial of Service Vulnerability (CVE-2026-84008)
...contains a reference to an insecure NuGet package 'system.security.cryptography.pkcs 9.0.18'. Recommendation: Upgrade System.Security.Cryptography.Pkcs from 9.0.18 to 9.0.21 to fix the vulnerability.

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. github-actions commented on Oct 14, 2026

    @github-actions
  2. jeffska commented on Oct 14, 2026

    @jeffska
    Author

    Info requested:
    .NET SDK 10.0.12
    Microsoft.Data.SqlClient 7.1.1
    OS: Windows 11 and Linux
    nuget why:

      [net10.0]
      ├── CLS.VxPackageExtractor (v400.3.0)
      │   └── NuGet.PackageManagement (v7.3.1)
      │       ├── NuGet.Commands (v7.3.1)
      │       │   ├── NuGet.Credentials (v7.3.1)
      │       │   │   └── NuGet.Protocol (v7.3.1)
      │       │   │       └── NuGet.Packaging (v7.3.1)
      │       │   │           └── System.Security.Cryptography.Pkcs (v9.0.18)
      │       │   └── NuGet.ProjectModel (v7.3.1)
      │       │       └── NuGet.DependencyResolver.Core (v7.3.1)
      │       │           └── NuGet.Protocol (v7.3.1)
      │       │               └── NuGet.Packaging (v7.3.1)
      │       │                   └── System.Security.Cryptography.Pkcs (v9.0.18)
      │       └── NuGet.Resolver (v7.3.1)
      │           └── NuGet.Protocol (v7.3.1)
      │               └── NuGet.Packaging (v7.3.1)
      │                   └── System.Security.Cryptography.Pkcs (v9.0.18)
      └── Microsoft.Data.SqlClient (v7.1.1)
          └── System.Security.Cryptography.Pkcs (v9.0.18)
    
  3. github-actions commented on Oct 14, 2026

    @github-actions

    🔍 Triage Summary (updated after author response)

    Check Result
    Issue type Bug (dependency vulnerability report)
    Environment ⚠️ Partial: received SqlClient version (7.1.1), .NET TFM (net10.0 / SDK 10.0.12) and dependency graph (nuget why); still missing: OS, SQL Server version (not relevant to this advisory)
    Area Area\Engineering
    Duplicates None found
    Regression Inconclusive

    Analysis

    The nuget why output shows System.Security.Cryptography.Pkcs 9.0.18 reaching the project through two paths: directly from Microsoft.Data.SqlClient 7.1.1, and transitively via NuGet.Packaging 7.3.1. The SqlClient path is likely a real concern for the released 7.1.1 package, while the NuGet path is outside this repo's control. Severity: P2 (DoS advisories on a dependency, with a workaround available).

    Next Steps

    • @jeffska, please confirm your OS. The SQL Server version isn't needed for this report.
    • Maintainers: check why the 7.1.1 package resolves Pkcs 9.0.18 on net10.0. Also check whether a servicing bump to 9.0.21 or later is needed, and whether the advisories apply to 10.x.
    • Workaround: add a direct PackageReference to System.Security.Cryptography.Pkcs 9.0.21 or later in your project to override both transitive paths.

    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 #4843 · copilot · auto · 22.1 AIC · ⌖ 11.5 AIC · ⊞ 13.6K · ◷

  4. jeffska commented on Oct 14, 2026

    @jeffska
    Author

    OS: Windows 11 and Linux

  5. escarls commented on Oct 14, 2026

    @escarls

    This also affects Microsoft.Data.SqlClient 6.1.7.

  6. mdaigle commented on Oct 14, 2026

    @mdaigle
    Contributor

    Thanks @jeffska. We'll bump all direct dependencies as part of our next round of releases. In the meantime please add a direct package reference to a secure version.

  7. silkfire commented on Oct 14, 2026

    @silkfire

    Thanks @jeffska. We'll bump all direct dependencies as part of our next round of releases. In the meantime please add a direct package reference to a secure version.

    @mdaigle When is the next planned release?

  8. 11 remaining items

  9. bklop commented on Oct 15, 2026

    @bklop

    It says on the milestones page that 7.1.2 is due by November 11, 2026. Does that mean we'll have to wait almost 4 weeks for this to be fixed? I would expect an immediate fix for a security issue like this. Adding direct package references for vulnerable dependencies is not a sustainable solution.

  10. ErikEJ commented on Oct 15, 2026

    @ErikEJ
    Contributor

    @bklop I you want an immediate fix, add a direct package reference. 8.0.0 is planned for November 4 btw.

  11. JohnMaddison commented on Oct 15, 2026

    @JohnMaddison

    I think the problem is that many people run their CI pipelines with "Warnings as errors" and this fails those builds. For those people it would be easier to have renovatebot bump this nugget rather than having to pin a new package in each repo.

  12. ErikEJ commented on Oct 15, 2026

    @ErikEJ
    Contributor

    @JohnMaddison Sure, but this package is not part of the dotnet runtime, it is maintained by the SQL Server team, and they need time to do their work properly.

  13. moved this from In progress to Done in SqlClient Boardon Oct 15, 2026
  14. moved this from Backlog to In progress in SqlClient Boardon Oct 16, 2026
  15. weifenluo commented on Oct 18, 2026

    @weifenluo

    21. @JohnMaddison Sure, but this package is not part of the dotnet runtime, it is maintained by the SQL Server team, and they need time to do their work properly.

    The SQL Server team has done their work properly, there is a new version 10.0.13 published on nuget, without marked as vulnerable. If we can add a transitive package reference to our .csproj to fix the vulnerable warning, Microsoft.Data.SqlClient can release a hot fix too.

  16. Frulfump commented on Oct 25, 2026

    @Frulfump

    I think the problem is that many people run their CI pipelines with "Warnings as errors" and this fails those builds. For those people it would be easier to have renovatebot bump this nugget rather than having to pin a new package in each repo.

    Here's what NuGet says about that https://learn.microsoft.com/en-us/nuget/concepts/auditing-packages#separating-errors-from-warnings-with-a-dedicated-auditing-pipeline

    You can use MSBuild's conditional statements to configure a dedicated CI pipeline for running audits, without audit warnings being treated as errors in other pipelines or on local builds. Depending on your CI system and team processes, you can have failed runs of the audit pipeline email the team, or you may have a dashboard where you can show a badge of the most recent run of the pipeline.

    Like many things in programming, there are multiple ways to achieve the outcome. One option is to treat NuGet Audit warnings as errors only in an audit pipeline.

    <PropertyGroup>
      <NuGetAuditCodes>NU1900;NU1901;NU1902;NU1903;NU1904;NU1905</NuGetAuditCodes>
      <WarningsAsErrors Condition=" '$(AuditPipeline)' == 'true' ">$(WarningsAsErrors);$(NuGetAuditCodes)</WarningsAsErrors>
      <WarningsNotAsErrors Condition=" '$(AuditPipeline)' != 'true' ">$(WarningsNotAsErrors);$(NuGetAuditCodes)</WarningsNotAsErrors>
    </PropertyGroup>

    And from what I know Renovate and Dependabot can already open PRs with a direct dependency instead until it's fixed upstream.

  17. priyankatiwari08 commented on Oct 26, 2026

    @priyankatiwari08
    Contributor

    The fix is merged and it will be released in 8.0.0-preview1 which is planned for this week.

  18. moved this from In progress to Done in SqlClient Boardon Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Hotfix Candidate 🚑

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions