# CVE-2017-0249: High severity vulnerability that affects Microsoft.AspNetCore.Mvc

> Attackers can elevate privileges by exploiting improper sanitization of web requests in the ASP.NET Core framework.

- **Severity:** High 7.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 May 2017
- **Updated:** 5 Aug 2024
- **Also known as:** ECHO-29ff-42b2-521d, GHSA-qhqf-ghgh-x2m4

## What is CVE-2017-0249?

CVE-2017-0249 is a high-severity vulnerability in Microsoft Corporation ASP.NET Core, published on 12 May 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An elevation of privilege vulnerability exists when the ASP.NET Core fails to properly sanitize web requests.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2017-0249?

40 open source packages ship an affected version, including Microsoft.AspNetCore.Mvc, DisCatSharp and Microsoft.AspNetCore.Mvc.Abstractions. It affects 18 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Microsoft.AspNetCore.Mvc` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc` | NuGet | From 1.1.0 | 1.1.3 |
| `DisCatSharp` | NuGet | All versions to 9.8.3 | None |
| `DisCatSharp` | NuGet | All versions to 9.8.3 | None |
| `Microsoft.AspNetCore.Mvc.Abstractions` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Abstractions` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Abstractions` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Abstractions` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.ApiExplorer` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.ApiExplorer` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.ApiExplorer` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.ApiExplorer` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Core` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Core` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Core` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Core` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Cors` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Cors` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Cors` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Cors` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.DataAnnotations` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.DataAnnotations` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.DataAnnotations` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.DataAnnotations` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Formatters.Json` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Formatters.Json` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Formatters.Json` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Formatters.Json` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Formatters.Xml` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Formatters.Xml` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Formatters.Xml` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Formatters.Xml` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Localization` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Localization` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Localization` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Localization` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Razor` | NuGet | From 1.0.0 | 1.0.4 |
| `Microsoft.AspNetCore.Mvc.Razor` | NuGet | From 1.0.0 | 1.0.4 |

Products: Microsoft Asp.net Model View Controller, Microsoft Microsoft.aspnetcore.mvc.abstractions, Microsoft Microsoft.aspnetcore.mvc.apiexplorer, Microsoft Microsoft.aspnetcore.mvc.cors, Microsoft Microsoft.aspnetcore.mvc.dataannotations, Microsoft Microsoft.aspnetcore.mvc.formatters.json, Microsoft Microsoft.aspnetcore.mvc.formatters.xml, Microsoft Microsoft.aspnetcore.mvc.localization, Microsoft Microsoft.aspnetcore.mvc.razor, Microsoft Microsoft.aspnetcore.mvc.razor.host, Microsoft Microsoft.aspnetcore.mvc.taghelpers, Microsoft Microsoft.aspnetcore.mvc.viewfeatures, Microsoft Microsoft.aspnetcore.mvc.webapicompatshim, Microsoft System.net.http, Microsoft System.net.http.winhttphandler, Microsoft System.net.security, Microsoft System.net.websockets.client, Microsoft System.text.encodings.web.

## How do I fix CVE-2017-0249?

Upgrade Microsoft.AspNetCore.Mvc to a fixed version for your release line: 1.0.4 or 1.1.3.

## Is CVE-2017-0249 being exploited?

There is no known exploitation of CVE-2017-0249 in the wild and no public exploit code.

## Other vulnerabilities in Microsoft Corporation ASP.NET Core

- [CVE-2017-0247](https://insights.sbomify.com/CVE-2017-0247/): ASP.NET Core fails to properly validate web requests (high 7.5)
- [CVE-2017-0256](https://insights.sbomify.com/CVE-2017-0256/): Moderate severity vulnerability that affects Microsoft.AspNetCore.Mvc (medium 5.3)
- [CVE-2014-4075](https://insights.sbomify.com/CVE-2014-4075/): Cross-site scripting in n/a (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-0249 and fix it if it is affected.

What it is: CVE-2017-0249 is a high-severity vulnerability in Microsoft Corporation ASP.NET Core, published on 12 May 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-0249 in the wild and no public exploit code.

Affected packages and fixed versions:
- Microsoft.AspNetCore.Mvc (NuGet): affected from 1.0.0; fixed in 1.0.4
- Microsoft.AspNetCore.Mvc (NuGet): affected from 1.0.0; fixed in 1.0.4
- Microsoft.AspNetCore.Mvc (NuGet): affected from 1.1.0; fixed in 1.1.3
- Microsoft.AspNetCore.Mvc (NuGet): affected from 1.1.0; fixed in 1.1.3
- DisCatSharp (NuGet): affected all versions up to 9.8.3; no fix listed
- DisCatSharp (NuGet): affected all versions up to 9.8.3; no fix listed
- Microsoft.AspNetCore.Mvc.Abstractions (NuGet): affected from 1.0.0; fixed in 1.0.4
- Microsoft.AspNetCore.Mvc.Abstractions (NuGet): affected from 1.0.0; fixed in 1.0.4
- Microsoft.AspNetCore.Mvc.Abstractions (NuGet): affected from 1.1.0; fixed in 1.1.3
- Microsoft.AspNetCore.Mvc.Abstractions (NuGet): affected from 1.1.0; fixed in 1.1.3
- Microsoft.AspNetCore.Mvc.ApiExplorer (NuGet): affected from 1.0.0; fixed in 1.0.4
- Microsoft.AspNetCore.Mvc.ApiExplorer (NuGet): affected from 1.0.0; fixed in 1.0.4

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-2017-0249/ (Markdown: https://insights.sbomify.com/CVE-2017-0249/index.md)
```

## Sources

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

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