Skip to content

NET Framework should not depend on nuget-package System.Data.Common- CVE-2020-1147 #4939

Closed as not planned

Description

@snakefoot

Describe the bug

#4063 - Added <PackageReference Include="System.Data.Common" /> instead of <Reference Include="System.Data.Common" /> for NET Framework.

This makes VeraCode report security vulnerability: CVE-2020-1147 Remote Code Execution (RCE)

To reproduce

Create project using NET Framework, and add latest SqlClient-nuget-package, and run VeraCode scan.

Expected behavior

Instead of NET Framework depending on the obsolete/unmaintained System.Data.Common-nuget-package, then it should use the native reference:

<Reference Include="System.Data.Common" />

See also: Reference Include="System.Transactions"

Further technical details

Microsoft.Data.SqlClient version: 7.0.1 (or newer)
.NET target: .NET Framework 4.8.1

Activity

  1. added theissue type on Oct 28, 2026
  2. changed the title [-]NET Framework should not depend on nuget-package System.Data.Common[/-] [+]NET Framework should not depend on nuget-package System.Data.Common- CVE-2020-1147[/+] on Oct 28, 2026
  3. github-actions commented on Oct 28, 2026

    @github-actions

    🔍 Triage Summary

    Check Result
    Issue type Bug
    Environment ⚠️ Partial: received SqlClient version (7.0.1+), repro steps, expected behavior; still missing: exact .NET Framework version (template placeholder left unfilled), SQL Server version, OS, actual behavior details (which package/version is flagged)
    Area Area\Netfx
    Duplicates None found (loosely related: #4843, #2786)
    Regression Likely regression from the change in #4063 (dependency added for .NET Framework); exact version boundary inconclusive

    Analysis

    The reporter says the net462 package dependency on System.Data.Common (added in #4063) causes Veracode to flag CVE-2020-1147. The affected component is the package dependency declaration for the .NET Framework target (csproj/nuspec), and the intended framework reference appears to have been lost from the issue text. Severity: P2 (supply-chain scanner noise/compliance, no runtime defect).

    Next Steps

    • @snakefoot, please provide: exact .NET Framework version, the flagged package and version in the scan output, SQL Server version and OS, and the dependency the issue text says should be used (the angle-bracket content was stripped).
    • Maintainers: review the net462 dependency group in the project/nuspec and whether a framework reference can replace the System.Data.Common package; bisect to the first release containing Add missing package reference to System.Data.Common #4063.

    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 #4939 · copilot · auto · 21.2 AIC · ⌖ 11.5 AIC · ⊞ 7.2K · ◷

  4. snakefoot commented on Oct 28, 2026

    @snakefoot
    Author

    @snakefoot, please provide: exact .NET Framework version, the flagged package and version in the scan output, SQL Server version and OS, and the dependency the issue text says should be used (the angle-bracket content was stripped).

    Veracode doesn't care about SQL Server Version, Operating System Version or NET Framework Version. VeraCode only cares about the package-versions and file-versions in the output folder. Any build using NET Framework will fail the VeraCode scan when using SqlClient v7.0.1 (or newer)

  5. snakefoot commented on Oct 28, 2026

    @snakefoot
    Author

    SqlClient v7.0.0 works just fine with NET Framework 4.8 (Just requires one to explicit add own reference as also mentioned here #4062).

    But SqlClient v7.0.1 (or newer) fails with VeraCode-Scan-Errors because the System.Data.Common-nuget-package is obsolete/unmaintained.

    Guess the "solution" is to stay on SqlClient v7.0.0 until you release SqlClient that supports NET 4.7.1 that includes:

    • System.Data.Common.DbColumn
    • System.Data.Common.DbDataReaderExtensions
    • System.Data.Common.IDbColumnSchemaGenerator

    See also: https://devblogs.microsoft.com/dotnet/net-framework-4-7-1-runtime-and-compiler-features/#bcl-net-standard-2-0-support

    P.S. .NET Framework 4.6.2 reaches End of Support on January 12, 2027 (So I guess it will be a Christmas/NewYear present)

  6. Frulfump commented on Oct 29, 2026

    @Frulfump
  7. mdaigle commented on Oct 29, 2026

    @mdaigle
    Contributor

    I think the warning you're receiving is overly broad. Our System.Data.Common package reference should largely be forwarding to System.Data.dll, so as long as your local .NET Framework version is up to date, you're not vulnerable. That's why the System.Data.Common package itself isn't marked as vulnerable in nuget or elsewhere.

  8. snakefoot commented on Oct 29, 2026

    @snakefoot
    Author

    If System.Data.Common-nuget-package is only forwarding then I think you should replace it with <Reference Include="System.Data.Common" /> for NET Framework.

  9. mdaigle commented on Oct 29, 2026

    @mdaigle
    Contributor

    It's forwarding except for the types that net462 lacks (and which we do require). But those are not subject to the vulnerabilities you've identified. It's definitely a confusing mess, just want to be clear that it's not causing a vulnerability. I don't disagree that a plain reference would be much simpler, but we'd need to bump to 4.7.2 like you mentioned. We'll weigh a target version bump based on clarity/maintainability, not security.

  10. mdaigle commented on Oct 29, 2026

    @mdaigle
    Contributor

    Our stance is to maintain net462 as long as there are no security concerns. .NET Framework applications are more likely to be legacy and are much less likely to be updated to target later framework versions. By maintaining net462, we reduce upgrade friction for apps still targeting net462. We will evaluate moving to net472 as a floor only as required to remain secure.

  11. moved this from To triage to Done in SqlClient Boardon Oct 29, 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

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions