.NET Core Remote Code Execution Vulnerability
Published 21 Apr 2021 · Updated 7 Dec 2024
Is your project on an affected System.Text.Encodings.Web?
Look after several .NET apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=4.0.0 <4.5.1
- Fixed in
- 4.5.1
dotnet add package System.Text.Encodings.Web --version 4.5.1- Affected
- >=4.6.0 <4.7.2
- Fixed in
- 4.7.2
dotnet add package System.Text.Encodings.Web --version 4.7.2- Affected
- >=5.0.0 <5.0.1
- Fixed in
- 5.0.1
dotnet add package System.Text.Encodings.Web --version 5.0.1Details
.NET Core Remote Code Execution Vulnerability This CVE ID is unique from CVE-2021-24112.
Executive summary
Microsoft is releasing this security advisory to provide information about a vulnerability in .NET 5.0, .NET Core 3.1, and .NET Core 2.1. This advisory also provides guidance on what developers can do to update their applications to remove this vulnerability.
A remote code execution vulnerability exists in .NET 5 and .NET Core due to how text encoding is performed.
Discussion
Discussion for this issue can be found at dotnet/runtime#49377
Mitigation factors
Microsoft has not identified any mitigating factors for this vulnerability.
Affected software
The vulnerable package is System.Text.Encodings.Web . Upgrading your package and redeploying your app should be sufficient to address this vulnerability.
Vulnerable package versions:
Any .NET 5, .NET Core, or .NET Framework based application that uses the System.Text.Encodings.Web package with a vulnerable version listed below.
Package Name | Vulnerable Versions | Secure Versions -|-|- System.Text.Encodings.Web | 4.0.0 - 4.5.0 | 4.5.1 System.Text.Encodings.Web | 4.6.0-4.7.1 | 4.7.2 System.Text.Encodings.Web | 5.0.0 | 5.0.1
Please validate that each of the .NET versions you are using is in support. Security updates are only provided for supported .NET versions.
Is GHSA-ghhp-997w-qr28 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected System.Text.Encodings.Web, and gives you the command that fixes it.
More advisories for System.Text.Encodings.Web
- MediumCVE-2017-0248Moderate severity vulnerability that affects Microsoft.AspNetCore.Mvc and Microsoft.AspNetCore.Mvc.Core · 16 Oct 2018
- HighCVE-2017-0247ASP.NET Core fails to properly validate web requests · 16 Oct 2018
- MediumCVE-2017-0256Moderate severity vulnerability that affects Microsoft.AspNetCore.Mvc · 16 Oct 2018
- HighCVE-2017-0249High severity vulnerability that affects Microsoft.AspNetCore.Mvc · 16 Oct 2018
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2021-26701
- Linkgithub.com/dotnet/announcements/issues/178
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S2AZOUKMCHT2WBHR7MYDTYXWOBHZW5P5
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TW3ZSJTTMZAFKGW7NJWTVVFZUYYU2SJZ
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UBOSSX7U6BSHV5RI74FCOW4ITJ5RRJR5
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WA5WQJVHUL5C4XMJTLY3C67R4WP35EF4
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XPUKFHIGP5YNJRRFWKDJ2XRS4WTFJNNK
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YLFATXASXW4OV2ZBSRP4G55HJH73QPBP
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S2AZOUKMCHT2WBHR7MYDTYXWOBHZW5P5
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TW3ZSJTTMZAFKGW7NJWTVVFZUYYU2SJZ
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UBOSSX7U6BSHV5RI74FCOW4ITJ5RRJR5
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WA5WQJVHUL5C4XMJTLY3C67R4WP35EF4
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XPUKFHIGP5YNJRRFWKDJ2XRS4WTFJNNK
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YLFATXASXW4OV2ZBSRP4G55HJH73QPBP
- Linkportal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-26701
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.