CVE-2021-31204: .NET and Visual Studio Elevation of Privilege Vulnerability HIGH 7.3 WATCHLIST UPGRADE UPGRADE UPGRADE
CVE-2021-31204 is a high-severity flaw (CVSS 7.3) affecting .net, .net core, visual studio 2019. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
.NET and Visual Studio Elevation of Privilege Vulnerability
Why this priority High severity On your watchlist A fixed release or distro patch exists.
Risk facts CVSS score 7.3 (High) Attack vector Local Attack complexity Low Privileges needed Low User interaction Required EPSS exploit chance 1.2% (top 32%) CISA exploited list No Weakness CWE-269 Published 2021-05-11 Last modified 2026-10-07
Share: LinkedIn · X · Reddit
Last updated 2026-10-07 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Timeline 2021-05-11 19:15 UTC Published CVE record published2026-10-07 17:16 UTC Updated Record last modifiedmicrosoft .net UPGRADE
Affected: >= 5.0 and <= 5.0.5
Fixed in: newer than 5.0.5
Safe to downgrade to: a release before 5.0
1. Check installed version
Copy apt-cache policy .net || rpm -q .net || .net --version
2. UPGRADE to newer than 5.0.5 (Debian / Ubuntu)
Copy sudo apt update && sudo apt install --only-upgrade .net
2. UPGRADE (RHEL / Amazon Linux / Fedora)
Copy sudo dnf upgrade .net
Note
Copy Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 5.0 (Debian / Ubuntu)
Copy apt-cache madison .net
sudo apt install .net=<VERSION_BEFORE_5.0>
sudo apt-mark hold .net
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
Copy dnf --showduplicates list .net
sudo dnf downgrade .net-<VERSION_BEFORE_5.0>
sudo dnf versionlock add .net
Downgrade risk
Copy Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Copy Restart the service, and keep the package held until a fixed release ships.
microsoft .net core UPGRADE
Affected: >= 3.1 and <= 3.1.14
Fixed in: newer than 3.1.14
Safe to downgrade to: a release before 3.1
1. Check installed version
Copy apt-cache policy .net-core || rpm -q .net-core || .net-core --version
2. UPGRADE to newer than 3.1.14 (Debian / Ubuntu)
Copy sudo apt update && sudo apt install --only-upgrade .net-core
2. UPGRADE (RHEL / Amazon Linux / Fedora)
Copy sudo dnf upgrade .net-core
Note
Copy Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 3.1 (Debian / Ubuntu)
Copy apt-cache madison .net-core
sudo apt install .net-core=<VERSION_BEFORE_3.1>
sudo apt-mark hold .net-core
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
Copy dnf --showduplicates list .net-core
sudo dnf downgrade .net-core-<VERSION_BEFORE_3.1>
sudo dnf versionlock add .net-core
Downgrade risk
Copy Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Copy Restart the service, and keep the package held until a fixed release ships.
microsoft visual studio 2019 UPGRADE
Affected: >= 16.0 and < 16.4.22 · >= 16.5.0 and < 16.7.15 · >= 16.8.0 and < 16.9.5
Fixed in: 16.4.22, 16.7.15, 16.9.5
Safe to downgrade to: a release before 16.0
1. Check installed version
Copy apt-cache policy visual-studio-2019 || rpm -q visual-studio-2019 || visual-studio-2019 --version
2. UPGRADE to 16.4.22 (Debian / Ubuntu)
Copy sudo apt update && sudo apt install --only-upgrade visual-studio-2019
2. UPGRADE (RHEL / Amazon Linux / Fedora)
Copy sudo dnf upgrade visual-studio-2019
Note
Copy Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 16.0 (Debian / Ubuntu)
Copy apt-cache madison visual-studio-2019
sudo apt install visual-studio-2019=<VERSION_BEFORE_16.0>
sudo apt-mark hold visual-studio-2019
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
Copy dnf --showduplicates list visual-studio-2019
sudo dnf downgrade visual-studio-2019-<VERSION_BEFORE_16.0>
sudo dnf versionlock add visual-studio-2019
Downgrade risk
Copy Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Copy Restart the service, and keep the package held until a fixed release ships.
microsoft visual studio 2019 DOWNGRADE
Affected: 8.9
Fixed in: no fixed release known
Safe to downgrade to: a release before 8.9
1. Check installed version
Copy apt-cache policy visual-studio-2019 || rpm -q visual-studio-2019 || visual-studio-2019 --version
2. No fixed release: DOWNGRADE to a release before 8.9 (Debian / Ubuntu)
Copy apt-cache madison visual-studio-2019
sudo apt install visual-studio-2019=<VERSION_BEFORE_8.9>
sudo apt-mark hold visual-studio-2019
2. No fixed release: DOWNGRADE (RHEL / Amazon Linux / Fedora)
Copy dnf --showduplicates list visual-studio-2019
sudo dnf downgrade visual-studio-2019-<VERSION_BEFORE_8.9>
sudo dnf versionlock add visual-studio-2019
Downgrade risk
Copy Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Copy Restart the service, and keep the package held until a fixed release ships.
fedoraproject fedora MITIGATE
Affected: 32 · 33 · 34
Fixed in: no fixed release known
Safe to downgrade to: a release before 32
Check your OS release
Copy cat /etc/os-release; uname -r
Debian / Ubuntu
Copy sudo apt update && sudo apt full-upgrade
RHEL / Amazon Linux / Fedora
Copy sudo dnf upgrade --refresh
Windows
Copy Install the latest cumulative update from Windows Update
If no patch exists yet
Copy OS downgrades are not safe. Apply the vendor mitigation from the advisory and restrict exposure.
Verify at the official source NVD ·
CVE Program ·
Report a problem with this page Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems. Quick answers How do I fix CVE-2021-31204? .net: upgrade to newer than 5.0.5; .net core: upgrade to newer than 3.1.14; visual studio 2019: upgrade to 16.4.22, 16.7.15, 16.9.5. Exact commands for each OS are on this page.
Is CVE-2021-31204 being exploited? CVE-2021-31204 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2021-31204 affect? CVE-2021-31204 affects .net, .net core, visual studio 2019. Severity is high (CVSS 7.3). .NET and Visual Studio Elevation of Privilege Vulnerability
How urgent is CVE-2021-31204? Priority 48/100. High severity; On your watchlist
Software pages .NET vulnerabilities · Visual Studio vulnerabilities
Related CVEs CVE-2026-71328 HIGH 8.8 UPGRADE UPGRADE Heap-based buffer overflow in Visual Studio allows an unauthorized attacker to execute code over a network.CVE-2026-69806 HIGH 7.0 UPGRADE UPGRADE Exposure of sensitive information to an unauthorized actor in .NET allows an authorized attacker to elevate prCVE-2026-69439 HIGH 8.8 UPGRADE UPGRADE Heap-based buffer overflow in .NET and Visual Studio allows an unauthorized attacker to elevate privileges oveCVE-2026-69304 MEDIUM 5.9 UPGRADE UPGRADE Improper handling of highly compressed data (data amplification) in ASP.NET Core allows an unauthorized attackCVE-2026-58649 MEDIUM 6.5 DOWNGRADE UPGRADE Origin validation error in .NET allows an unauthorized attacker to disclose information over a network.References ← Back to latest CVEs