# CVE-2017-0256: Moderate severity vulnerability that affects Microsoft.AspNetCore.Mvc

> Attackers can spoof web requests due to improper sanitization in ASP.NET Core, potentially bypassing security controls.

- **Severity:** Medium 5.3 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **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-9424-2651-8ae8, GHSA-j8f4-2w4p-mhjc

## What is CVE-2017-0256?

CVE-2017-0256 is a medium-severity cross-site scripting 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

A spoofing 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-0256?

40 open source packages ship an affected version, including Microsoft.AspNetCore.Mvc, Microsoft.AspNetCore.Mvc.Abstractions and Microsoft.AspNetCore.Mvc.ApiExplorer. 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 |
| `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 |
| `Microsoft.AspNetCore.Mvc.Razor` | NuGet | From 1.1.0 | 1.1.3 |
| `Microsoft.AspNetCore.Mvc.Razor` | NuGet | From 1.1.0 | 1.1.3 |

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-0256?

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

## Is CVE-2017-0256 being exploited?

There is no known exploitation of CVE-2017-0256 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-0249](https://insights.sbomify.com/CVE-2017-0249/): High severity vulnerability that affects Microsoft.AspNetCore.Mvc (high 7.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-0256 and fix it if it is affected.

What it is: CVE-2017-0256 is a medium-severity cross-site scripting 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-0256 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
- 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
- Microsoft.AspNetCore.Mvc.ApiExplorer (NuGet): affected from 1.1.0; fixed in 1.1.3
- Microsoft.AspNetCore.Mvc.ApiExplorer (NuGet): affected from 1.1.0; fixed in 1.1.3

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

## Sources

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

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