Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Security Advisory CVE-2024-43485 | .NET Denial of Service Vulnerability #108678

Open
rbhanda opened this issue Oct 8, 2024 · 14 comments

Comments

@rbhanda
Copy link
Contributor

rbhanda commented Oct 8, 2024

Microsoft Security Advisory CVE-2024-43485 | .NET Denial of Service Vulnerability

Executive summary

Microsoft is releasing this security advisory to provide information about a vulnerability in System.Text.Json 6.0.x and 8.0.x. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.

In System.Text.Json 6.0.x and 8.0.x, applications which deserialize input to a model with an [ExtensionData] property can be vulnerable to an algorithmic complexity attack resulting in Denial of Service.

Announcement

Announcement for this issue can be found at dotnet/announcements#329

Mitigation factors

JSON models which do not utilize the [ExtensionData] feature are not impacted by this vulnerability.

Affected software

  • Any .NET 8.0 application running on .NET 8.0.8 or earlier.
  • Any .NET 6.0 aplication running on .NET 6.0.33 or earlier.
  • Any application consuming one of the vulnerable packages.

Affected Packages

The vulnerability affects any Microsoft .NET Core project if it uses any of affected packages versions listed below

.NET 8

Package name Affected version Patched version
System.Text.Json >= 8.0.0, <= 8.0.4 8.0.5

.NET 6

Package name Affected version Patched version
System.Text.Json >= 6.0.0, <= 6.0.9 6.0.10

Advisory FAQ

How do I know if I am affected?

If you have a runtime or SDK with a version listed, or an affected package listed in affected software or affected packages, you're exposed to the vulnerability.

How do I fix the issue?

  • To fix the issue please install the latest version of .NET 8.0 or .NET 6.0. If you have installed one or more .NET SDKs through Visual Studio, Visual Studio will prompt you to update Visual Studio, which will also update your .NET SDKs.
  • .NET Framework-based applications and other application types need to perform a package update.
  • If you have .NET 6.0 or greater installed, you can list the versions you have installed by running the dotnet --info command. You will see output like the following;
.NET Core SDK (reflecting any global.json):


 Version:   8.0.200
 Commit:    8473146e7d

Runtime Environment:

 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.300\

Host (useful for support):

  Version: 8.0.3
  Commit:  8473146e7d

.NET Core SDKs installed:

  8.0.200 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:

  Microsoft.AspAspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspAspNetCore.App]
  Microsoft.AspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]


To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

.NET 8.0 and .NET 6.0 updates are also available from Microsoft Update. To access this either type "Check for updates" in your Windows search, or open Settings, choose Update & Security and then click Check for Updates.

Once you have installed the updated runtime or SDK, restart your apps for the update to take effect.

Additionally, if you've deployed self-contained applications targeting any of the impacted versions, these applications are also vulnerable and must be recompiled and redeployed.

Other Information

Reporting Security Issues

If you have found a potential security issue in .NET 8.0 or .NET 6.0, please email details to secure@microsoft.com. Reports may qualify for the Microsoft .NET Core & .NET 5 Bounty. Details of the Microsoft .NET Bounty Program including terms and conditions are at https://aka.ms/corebounty.

Support

You can ask questions about this issue on GitHub in the .NET GitHub organization. The main repos are located at https://github.com/dotnet/runtime and https://github.com/dotnet/aspnet/. The Announcements repo (https://github.com/dotnet/Announcements) will contain this bulletin as an issue and will include a link to a discussion issue. You can ask questions in the linked discussion issue.

Disclaimer

The information provided in this advisory is provided "as is" without warranty of any kind. Microsoft disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Microsoft Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Microsoft Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.

External Links

CVE-2024-43485

Revisions

V1.0 (October 08, 2024): Advisory published.

Version 1.0

Last Updated 2024-10-08

@vanbukin
Copy link
Contributor

vanbukin commented Oct 8, 2024

You incorrectly specified the affected and patched versions of System.Text.Json for .NET 6.
There was never a package version 6.0.35.
The correct range of affected versions is 6.0.0 - 6.0.9, and according to NuGet, the fixed version is 6.0.10.

Because of this, the building of projects with <TreatWarningsAsErrors>true</TreatWarningsAsErrors> is broken now.

@JohnYoungers
Copy link

I believe the same is true for .NET 8 as well: it says 8.0.8 and below are vulnerable with the patch being 8.0.10, but neither exist (8.0.5 was published today): https://www.nuget.org/packages/System.Text.Json

@rbhanda
Copy link
Contributor Author

rbhanda commented Oct 8, 2024

My apologies. I have corrected the versions for the System.Text.Json

@davidwengier
Copy link
Contributor

Not sure this is actionable here, but the GitHub CVE still shows 8.0.10 as the patched version, and the Nuget package manager in VS shows 8.0.5 as vulnerable :(

image

@vanbukin
Copy link
Contributor

vanbukin commented Oct 8, 2024

Will the changes apply to dependabot alerts?

@rbhanda
Copy link
Contributor Author

rbhanda commented Oct 8, 2024

Will the changes apply to dependabot alerts?

github/advisory-database#4882 - once this gets merged, the alerts should also go away

@Welchen
Copy link

Welchen commented Oct 8, 2024

@rbhanda this problem also exists with CVE-2024-43483.

@hoerup
Copy link

hoerup commented Oct 9, 2024

Forgive me if i'm mistaken but shouldn't the advisory text be refering to [JsonExtensionData] / JsonExtensionDataAttribute instead of [ExtensionData] (which I cant seem to find anywhere) ?

@tboby
Copy link

tboby commented Oct 9, 2024

@rbhanda
Sorry, It's not clear what the mitigation requirements are.

Is it:

  1. Update the runtime, and/or
  2. Rebuild the application with the patched package.

The amount of work required is very different between the two, but the security advisory is confusing.

Any .NET 8.0 application running on .NET 8.0.8 or earlier.

Implies it's a runtime vulnerability.

Once you have installed the updated runtime or SDK, restart your apps for the update to take effect.

Also implies that it's a runtime vulnerability.

However the advisory has been linked to the nuget package only.

Which is it? If it's a package vulnerability only why is the very large "How do I fix the issue?" section talking about the runtime? And why does "How do I know if I am affected?" mention the runtime?

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@takata1021
Copy link

How do I update the target framework .net8?

@jyothi530
Copy link

jyothi530 commented Nov 6, 2024

Hello, We updated the .NET 8 SDK and runtime to latest patch version as per the advisory but still the 'dotnet list --vulnerable --include-transitive' is showing the System.Text.Json as vulnerable. We don't have a direct dependency on the 'System.Text.Json'.
Is this still an issue?
Following is my dotnet --info output

.NET SDK:
 Version:           8.0.403
 Commit:            c64aa40a71
 Workload version:  8.0.400-manifests.e99c892e
 MSBuild version:   17.11.9+a69bbaaf5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.403\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
 [aspire]
   Installation Source: VS 17.11.35327.3
   Manifest Version:    8.1.0/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
   Install Type:        FileBased


Host:
  Version:      8.0.10
  Architecture: x64
  Commit:       81cabf2857

.NET SDKs installed:
  6.0.427 [C:\Program Files\dotnet\sdk]
  8.0.403 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@mungojam
Copy link

mungojam commented Nov 7, 2024

Hello, We updated the .NET 8 SDK and runtime to latest patch version as per the advisory but still the 'dotnet list --vulnerable --include-transitive' is showing the System.Text.Json as vulnerable. We don't have a direct dependency on the 'System.Text.Json'.
Is this still an issue?

@jyothi530 use

dotnet nuget why . System.Text.Json

to see where it is coming from. There are a few culprits we are seeing like the SQL server client

@frankshearar
Copy link

@jyothi530 you can mitigate the issue by taking a direct dependency on System.Text.Json 8.0.5 (or whatever). Either in the csproj (etc) files, or in your Directory.Packages.props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests