CVE-2020-1045: Microsoft.AspNetCore.Http Cookie Parsing Failure Vulnerability

HIGH
Advisory Identifier: GHSA-hxrm-9w7p-39cc
CVSS 7.5
Published
Advisory Summary

CVE-2020-1045 is a HIGH (CVSS 7.5) cookie parsing failure vulnerability (General Security Weakness) affecting Microsoft.AspNetCore.Http libraries in the NuGet ecosystem. The issue involves cookie parsing failure. Remediation is available by upgrading affected packages to version 2.1.22, 4.1.1, 3.1.8.

CVE-2020-1045 at a Glance

CVE Identifier CVE-2020-1045
GHSA Identifier GHSA-hxrm-9w7p-39cc
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Microsoft.AspNetCore.Http
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2020-1045

To remediate this vulnerability, upgrade all affected Microsoft.AspNetCore.Http dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Microsoft.AspNetCore.Http fixed: 2.1.22
Upgrade Microsoft.AspNetCore.Http to 2.1.22
Microsoft.AspNetCore.App fixed: 2.1.22
Upgrade Microsoft.AspNetCore.App to 2.1.22
Microsoft.Owin fixed: 4.1.1
Upgrade Microsoft.Owin to 4.1.1
Microsoft.AspNetCore.App.Runtime.linux-arm fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.linux-arm to 3.1.8
Microsoft.AspNetCore.App.Runtime.linux-arm64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.linux-arm64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.linux-musl-x64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.linux-musl-x64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.linux-x64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.linux-x64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.osx-x64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.osx-x64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.win-arm fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.win-arm to 3.1.8
Microsoft.AspNetCore.App.Runtime.win-x64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.win-x64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.win-x86 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.win-x86 to 3.1.8
Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.linux-musl-arm64 to 3.1.8
Microsoft.AspNetCore.App.Runtime.win-arm64 fixed: 3.1.8
Upgrade Microsoft.AspNetCore.App.Runtime.win-arm64 to 3.1.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Microsoft.AspNetCore.Http

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-1045, inspect your project dependencies for Microsoft.AspNetCore.Http:

inspect dependencies for Microsoft.AspNetCore.Http

Analyze the terminal output to locate any version of Microsoft.AspNetCore.Http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.22), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Microsoft.AspNetCore.Http, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A security feature bypass vulnerability exists in the way Microsoft ASP.NET Core parses encoded cookie names.The ASP.NET Core cookie parser decodes entire cookie strings which could allow a malicious attacker to set a second cookie with the name being percent encoded.The security update addresses the vulnerability by fixing the way the ASP.NET Core cookie parser handles encoded names., aka 'Microsoft ASP.NET Core Security Feature Bypass Vulnerability'.

CVE-2020-1045 Affected Microsoft.AspNetCore.Http Versions

13 component(s)
Fixed Versions:
2.1.224.1.13.1.8
Product / Package Ecosystem Affected Versions Fixed Version
Microsoft.AspNetCore.Http
NuGet
< 2.1.22
2.1.22
Microsoft.AspNetCore.App
NuGet
< 2.1.22
2.1.22
Microsoft.Owin
NuGet
< 4.1.1
4.1.1
Microsoft.AspNetCore.App.Runtime.linux-arm
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.linux-arm64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.linux-musl-x64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.linux-x64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.osx-x64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.win-arm
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.win-x64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.win-x86
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.linux-musl-arm64
NuGet
≥ 3.1.0
< 3.1.8
3.1.8
Microsoft.AspNetCore.App.Runtime.win-arm64
NuGet
≥ 3.1.5
< 3.1.8
3.1.8

References

NVD — CVE-2020-1045 NVD
https://nvd.nist.gov/vuln/detail/CVE-2020-1045
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/dotnet/announcements/issues/165
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/dotnet/aspnetcore/issues/25701
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/dotnet/aspnetcore/issues/25701#issuecomment-689434477
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/github/advisory-database/issues/302
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/dotnet/aspnetcore/pull/24264
access.redhat.com/errata/rhsa-2020:36... WEB
https://access.redhat.com/errata/RHSA-2020:3699
Microsoft.AspNetCore.Http Source Repository REPOSITORY
https://github.com/dotnet/core/blob/main/release-notes/3.1/3.1.8/3.1.8.md#changes-in-318
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5LN2FUVBSVPGK7AU3NMLO3YR6CGONQPB
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ASICXQXS4M7MTAF6SGQMCLCA63DLCUT3
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5LN2FUVBSVPGK7AU3NMLO3YR6CGONQPB
lists.fedoraproject.org/archives/list/packa... WEB
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ASICXQXS4M7MTAF6SGQMCLCA63DLCUT3
Microsoft.AspNetCore.Http Security Information SECURITY
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1045
Microsoft.AspNetCore.Http Security Information SECURITY
https://security.snyk.io/vuln/SNYK-RHEL8-DOTNET-1439600

Frequently Asked Questions

What is CVE-2020-1045?
CVE-2020-1045 is a security vulnerability in Microsoft.AspNetCore.Http involving Cookie parsing failure under General Security Weakness.
Which Microsoft.AspNetCore.Http versions are affected?
Affected versions include releases prior to 2.1.22, 4.1.1, 3.1.8 across affected packages: Microsoft.AspNetCore.Http, Microsoft.AspNetCore.App, Microsoft.Owin, Microsoft.AspNetCore.App.Runtime.linux-arm, Microsoft.AspNetCore.App.Runtime.linux-arm64, Microsoft.AspNetCore.App.Runtime.linux-musl-x64, Microsoft.AspNetCore.App.Runtime.linux-x64, Microsoft.AspNetCore.App.Runtime.osx-x64, Microsoft.AspNetCore.App.Runtime.win-arm, Microsoft.AspNetCore.App.Runtime.win-x64, Microsoft.AspNetCore.App.Runtime.win-x86, Microsoft.AspNetCore.App.Runtime.linux-musl-arm64, Microsoft.AspNetCore.App.Runtime.win-arm64.
What version fixes CVE-2020-1045?
Upgrading to 2.1.22, 4.1.1, 3.1.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Microsoft.AspNetCore.Http affected?
Yes, Microsoft.AspNetCore.Http is affected in releases prior to 2.1.22. Upgrade your dependency to 2.1.22 or later.
Is Microsoft.AspNetCore.App affected?
Yes, Microsoft.AspNetCore.App is affected in releases prior to 2.1.22. Upgrade your dependency to 2.1.22 or later.
What is the CVSS score of CVE-2020-1045?
CVE-2020-1045 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2020-1045?
CVE-2020-1045 is classified under General Security Weakness.
How can I check NuGet dependencies for CVE-2020-1045?
Run the dependency tree command: 'inspect dependencies for Microsoft.AspNetCore.Http'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hxrm-9w7p-39cc",
  "modified" : "2022-07-07T23:06:40Z",
  "published" : "2022-05-24T17:27:57Z",
  "aliases" : [ "CVE-2020-1045" ],
  "summary" : "Cookie parsing failure",
  "details" : "A security feature bypass vulnerability exists in the way Microsoft ASP.NET Core parses encoded cookie names.The ASP.NET Core cookie parser decodes entire cookie strings which could allow a malicious attacker to set a second cookie with the name being percent encoded.The security update addresses the vulnerability by fixing the way the ASP.NET Core cookie parser handles encoded names., aka 'Microsoft ASP.NET Core Security Feature Bypass Vulnerability'.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.Http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.22"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.22"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.21"
    }
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.Owin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.linux-arm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.linux-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.linux-musl-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.linux-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.osx-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.win-arm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.win-x64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.win-x86"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.0"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.AspNetCore.App.Runtime.win-arm64"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.1.5"
      }, {
        "fixed" : "3.1.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-1045"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/announcements/issues/165"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/aspnetcore/issues/25701"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/aspnetcore/issues/25701#issuecomment-689434477"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/issues/302"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/aspnetcore/pull/24264"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:3699"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/core/blob/main/release-notes/3.1/3.1.8/3.1.8.md#changes-in-318"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5LN2FUVBSVPGK7AU3NMLO3YR6CGONQPB"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ASICXQXS4M7MTAF6SGQMCLCA63DLCUT3"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5LN2FUVBSVPGK7AU3NMLO3YR6CGONQPB"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ASICXQXS4M7MTAF6SGQMCLCA63DLCUT3"
  }, {
    "type" : "WEB",
    "url" : "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1045"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-RHEL8-DOTNET-1439600"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-07T23:06:40Z",
    "nvd_published_at" : "2020-09-11T17:15:00Z"
  }
}