# CVE-2020-1147: Microsoft .NET Framework, SharePoint, and Visual Studio Remote Code Execution

> Remote attackers can execute arbitrary code by exploiting an XML External Entity vulnerability in .NET Framework, SharePoint, and Visual Studio.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 3 Nov 2021 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 Jul 2020
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-g5vf-38cp-4px9, RHSA-2020:2937, RHSA-2020:2938, RHSA-2020:2939, RHSA-2020:2954, RHSA-2020:2988, RHSA-2020:2989

## What is CVE-2020-1147?

CVE-2020-1147 is a high-severity vulnerability in Microsoft .Net Framework, published on 14 Jul 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

A remote code execution vulnerability exists in .NET Framework, Microsoft SharePoint, and Visual Studio when the software fails to check the source markup of XML file input, aka '.NET Framework, SharePoint Server, and Visual Studio Remote Code Execution Vulnerability'.

## Which versions are affected by CVE-2020-1147?

24 open source packages ship an affected version, including Microsoft.NETCore.App, Microsoft.NETCore.App.Runtime.linux-arm and Microsoft.NETCore.App.Runtime.linux-arm64. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Microsoft.NETCore.App` | NuGet | From 2.1.0 | 2.1.20 |
| `Microsoft.NETCore.App` | NuGet | From 2.1.0 | 2.1.20 |
| `Microsoft.NETCore.App.Runtime.linux-arm` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-arm` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-musl-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-musl-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-musl-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-musl-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.linux-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.osx-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.osx-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.rhel.6-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.rhel.6-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-arm` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-arm` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-arm64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-x64` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-x86` | NuGet | From 3.1.0 | 3.1.6 |
| `Microsoft.NETCore.App.Runtime.win-x86` | NuGet | From 3.1.0 | 3.1.6 |
| `aspnetcore-runtime-3.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `aspnetcore-targeting-pack-3.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.516-1.el8_2 |
| `dotnet` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.106-1.el8_2 |
| `dotnet-apphost-pack-3.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-apphost-pack-3.1-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.516-1.el8_2 |
| `dotnet-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.516-1.el8_2 |
| `dotnet-host` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-host-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-host-fxr-2.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.20-1.el8_2 |
| `dotnet-host-fxr-2.1-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.20-1.el8_2 |
| `dotnet-hostfxr-3.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-hostfxr-3.1-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.1.6-1.el8_2 |
| `dotnet-runtime-2.1` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.20-1.el8_2 |
| `dotnet-runtime-2.1-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:2.1.20-1.el8_2 |

Products: Microsoft .Net Core, Microsoft .Net Framework, Microsoft Sharepoint Enterprise Server, Microsoft Sharepoint Server, Microsoft Visual Studio 2017, Microsoft Visual Studio 2019.

## How do I fix CVE-2020-1147?

Upgrade Microsoft.NETCore.App to 2.1.20 or later. US federal agencies must fix it by 3 May 2022.

## Is CVE-2020-1147 being exploited?

Yes. Attackers have exploited CVE-2020-1147 in the wild since at least 3 Nov 2021.

Public exploit code:

- SharePoint DataSet / DataTable Deserialization (metasploit)
- Microsoft SharePoint Server 2019 - Remote Code Execution (exploitdb)
- Microsoft SharePoint Server 2019 - Remote Code Execution (2) (exploitdb)

## Other vulnerabilities in Microsoft .Net Framework

- [CVE-2020-0605](https://insights.sbomify.com/CVE-2020-0605/): Code injection in .NET Core (high 8.8)
- [CVE-2020-0606](https://insights.sbomify.com/CVE-2020-0606/): Remote code execution in Microsoft.WindowsDesktop.App.Ref (high 8.8)
- [CVE-2019-1301](https://insights.sbomify.com/CVE-2019-1301/): High severity vulnerability that affects System.Management.Automation (high 7.5)
- [CVE-2019-0820](https://insights.sbomify.com/CVE-2019-0820/): Regular Expression Denial of Service in System.Text.RegularExpressions (high 7.5)
- [CVE-2019-0980](https://insights.sbomify.com/CVE-2019-0980/): Denial of service in ASP.NET Core (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-1147 and fix it if it is affected.

What it is: CVE-2020-1147 is a high-severity vulnerability in Microsoft .Net Framework, published on 14 Jul 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: Yes. Attackers have exploited CVE-2020-1147 in the wild since at least 3 Nov 2021.

Affected packages and fixed versions:
- Microsoft.NETCore.App (NuGet): affected from 2.1.0; fixed in 2.1.20
- Microsoft.NETCore.App (NuGet): affected from 2.1.0; fixed in 2.1.20
- Microsoft.NETCore.App.Runtime.linux-arm (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-arm (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-arm64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-arm64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-musl-arm64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-musl-arm64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-musl-x64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-musl-x64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-x64 (NuGet): affected from 3.1.0; fixed in 3.1.6
- Microsoft.NETCore.App.Runtime.linux-x64 (NuGet): affected from 3.1.0; fixed in 3.1.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-1147/ (Markdown: https://insights.sbomify.com/CVE-2020-1147/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-1147
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-1147
- OSV: https://osv.dev/vulnerability/CVE-2020-1147

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-1147/
Summaries are generated and may contain mistakes; the official description above is the record.
