azure-functions-dotnet-worker: [BUG] Microsoft.Azure.Functions.Worker.Extensions.ServiceBus generates references to NuGet packages with known vulnerablities
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #42260.
Please be aware that @seancostigan is the author of the original issue and include them for any questions or replies.
Details
Library name and version
Microsoft.Azure.Functions.Worker.Extensions.ServiceBus 5.17.0
Describe the bug
When referencing the Microsoft.Azure.Functions.Worker.Extensions.ServiceBus NuGet package in a .NET 8 Azure Function, the WorkerExtensions.csproj file that is created during the build is referencing Microsoft.Azure.WebJobs.Extensions.ServiceBus 5.13.5, which has transitive dependencies on 2 NuGet packages with known high severity vulnerabilities (Grpc.Net.Client 2.49.0 and Grpc.AspNetCore.Server 2.49.0). This is causing our code scanning tool to block the application due to the vulnerabilities.
This is the WorkerExtensions.csproj file that is generated during the build:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>preview</LangVersion>
<Configuration>Release</Configuration>
<AssemblyName>Microsoft.Azure.Functions.Worker.Extensions</AssemblyName>
<RootNamespace>Microsoft.Azure.Functions.Worker.Extensions</RootNamespace>
<MajorMinorProductVersion>1.0</MajorMinorProductVersion>
<Version>$(MajorMinorProductVersion).0</Version>
<AssemblyVersion>$(MajorMinorProductVersion).0.0</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.Targets" Version="3.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.2.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.13.5" />
</ItemGroup>
</Project>
Please update Microsoft.Azure.Functions.Worker.Extensions.ServiceBus and Microsoft.Azure.WebJobs.Extensions.ServiceBus so that they use later versions of the NuGet packages to address the vulnerabilities.
Expected behavior
Using Microsoft.Azure.Functions.Worker.Extensions.ServiceBus should not pull in NuGet packages with known security vulnerabilities
Actual behavior
Microsoft.Azure.Functions.Worker.Extensions.ServiceBus pulls in NuGet packages with known security vulnerabilities which is causing my pipeline code scanning tool to block my application
Reproduction Steps
- Create a new .NET 8 Azure Function
- Select Service Bus Topic trigger
- Once the project loads, open the NuGet package manager and update all directly referenced NuGet packages to the latest version
- Build the project
- Check the bin\Debug\net8.0.azurefunctions folder and you will find Grpc.Net.Client 2.49.0 and Grpc.AspNetCore.Server 2.49.0
- You can view the WorkerExtensions.csproj file in \obj\Debug\net8.0\WorkerExtensions
- Open the .csproj file and you can see that it is referencing
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.13.5" />which has transitive dependencies on Grpc.Net.Client and Grpc.AspNetCore.Server
Environment
- Windows 10 .NET 8.0 (.NET SDK 8.0.102)
- Visual Studio 17.8.7
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (8 by maintainers)
That CVE is wrong. Grpc.Net.Client and Grpc.AspNetCore.Server aren’t impacted. The .NET HTTP/2 implementation is different.
Can you please give feedback to whoever says those packages are vulnerable that they’re wrong and fix their mistake.