CVE-2018-0786: Microsoft.NETCore.UniversalWindowsPlatform Improper Certificate Validation Vulnerability

HIGH
Advisory Identifier: GHSA-jc8g-xhw5-6x46
CVSS 7.5
CWE-295
Published
Advisory Summary

CVE-2018-0786 is a HIGH (CVSS 7.5) improper certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Microsoft.NETCore.UniversalWindowsPlatform libraries in the NuGet ecosystem. The issue involves improper certificate validation in microsoft .net framework components. Remediation is available by upgrading affected packages to version 5.2.4, 5.3.5, 5.4.2, 6.0.6, 4.4.1, 4.3.1, 4.1.1, 4.0.2.

CVE-2018-0786 at a Glance

CVE Identifier CVE-2018-0786
GHSA Identifier GHSA-jc8g-xhw5-6x46
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Microsoft.NETCore.UniversalWindowsPlatform
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.0/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-2018-0786

To remediate this vulnerability, upgrade all affected Microsoft.NETCore.UniversalWindowsPlatform 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.NETCore.UniversalWindowsPlatform fixed: 5.2.4
Upgrade Microsoft.NETCore.UniversalWindowsPlatform to 5.2.4
Microsoft.NETCore.UniversalWindowsPlatform fixed: 5.3.5
Upgrade Microsoft.NETCore.UniversalWindowsPlatform to 5.3.5
Microsoft.NETCore.UniversalWindowsPlatform fixed: 5.4.2
Upgrade Microsoft.NETCore.UniversalWindowsPlatform to 5.4.2
Microsoft.NETCore.UniversalWindowsPlatform fixed: 6.0.6
Upgrade Microsoft.NETCore.UniversalWindowsPlatform to 6.0.6
System.ServiceModel.Primitives fixed: 4.4.1
Upgrade System.ServiceModel.Primitives to 4.4.1
System.ServiceModel.Primitives fixed: 4.3.1
Upgrade System.ServiceModel.Primitives to 4.3.1
System.ServiceModel.Primitives fixed: 4.1.1
Upgrade System.ServiceModel.Primitives to 4.1.1
System.ServiceModel.Http fixed: 4.4.1
Upgrade System.ServiceModel.Http to 4.4.1
System.ServiceModel.Http fixed: 4.3.1
Upgrade System.ServiceModel.Http to 4.3.1
System.ServiceModel.Http fixed: 4.1.1
Upgrade System.ServiceModel.Http to 4.1.1
System.ServiceModel.NetTcp fixed: 4.4.1
Upgrade System.ServiceModel.NetTcp to 4.4.1
System.ServiceModel.NetTcp fixed: 4.3.1
Upgrade System.ServiceModel.NetTcp to 4.3.1
System.ServiceModel.NetTcp fixed: 4.1.1
Upgrade System.ServiceModel.NetTcp to 4.1.1
System.ServiceModel.Duplex fixed: 4.4.1
Upgrade System.ServiceModel.Duplex to 4.4.1
System.ServiceModel.Duplex fixed: 4.3.1
Upgrade System.ServiceModel.Duplex to 4.3.1
System.ServiceModel.Duplex fixed: 4.0.2
Upgrade System.ServiceModel.Duplex to 4.0.2
System.ServiceModel.Security fixed: 4.4.1
Upgrade System.ServiceModel.Security to 4.4.1
System.ServiceModel.Security fixed: 4.3.1
Upgrade System.ServiceModel.Security to 4.3.1
System.ServiceModel.Security fixed: 4.0.2
Upgrade System.ServiceModel.Security to 4.0.2
System.Private.ServiceModel fixed: 4.4.1
Upgrade System.Private.ServiceModel to 4.4.1
System.Private.ServiceModel fixed: 4.3.1
Upgrade System.Private.ServiceModel to 4.3.1
System.Private.ServiceModel fixed: 4.1.1
Upgrade System.Private.ServiceModel to 4.1.1
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.NETCore.UniversalWindowsPlatform

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-0786, inspect your project dependencies for Microsoft.NETCore.UniversalWindowsPlatform:

inspect dependencies for Microsoft.NETCore.UniversalWindowsPlatform

Analyze the terminal output to locate any version of Microsoft.NETCore.UniversalWindowsPlatform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.4), 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 CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Microsoft.NETCore.UniversalWindowsPlatform, 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

Microsoft .NET Framework 2.0 SP2, 3.0 SP2, 3.5, 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, .NET Core 1.0 and 2.0, and PowerShell Core 6.0.0 allow a security feature bypass vulnerability due to the way certificates are validated, aka ".NET Security Feature Bypass Vulnerability."

CVE-2018-0786 Affected Microsoft.NETCore.UniversalWindowsPlatform Versions

22 component(s)
Fixed Versions:
5.2.45.3.55.4.26.0.64.4.14.3.14.1.14.0.2
Product / Package Ecosystem Affected Versions Fixed Version
Microsoft.NETCore.UniversalWindowsPlatform
NuGet
≥ 5.2.0
< 5.2.4
5.2.4
Microsoft.NETCore.UniversalWindowsPlatform
NuGet
≥ 5.3.0
< 5.3.5
5.3.5
Microsoft.NETCore.UniversalWindowsPlatform
NuGet
≥ 5.4.0
< 5.4.2
5.4.2
Microsoft.NETCore.UniversalWindowsPlatform
NuGet
≥ 6.0.0
< 6.0.6
6.0.6
System.ServiceModel.Primitives
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.ServiceModel.Primitives
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.ServiceModel.Primitives
NuGet
≥ 4.1.0
< 4.1.1
All 1 versions
4.1.0
4.1.1
System.ServiceModel.Http
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.ServiceModel.Http
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.ServiceModel.Http
NuGet
≥ 4.1.0
< 4.1.1
All 1 versions
4.1.0
4.1.1
System.ServiceModel.NetTcp
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.ServiceModel.NetTcp
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.ServiceModel.NetTcp
NuGet
≥ 4.1.0
< 4.1.1
All 1 versions
4.1.0
4.1.1
System.ServiceModel.Duplex
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.ServiceModel.Duplex
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.ServiceModel.Duplex
NuGet
≥ 4.0.1
< 4.0.2
All 1 versions
4.0.1
4.0.2
System.ServiceModel.Security
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.ServiceModel.Security
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.ServiceModel.Security
NuGet
≥ 4.0.1
< 4.0.2
All 1 versions
4.0.1
4.0.2
System.Private.ServiceModel
NuGet
≥ 4.4.0
< 4.4.1
All 1 versions
4.4.0
4.4.1
System.Private.ServiceModel
NuGet
≥ 4.3.0
< 4.3.1
All 1 versions
4.3.0
4.3.1
System.Private.ServiceModel
NuGet
≥ 4.1.0
< 4.1.1
All 1 versions
4.1.0
4.1.1

References

Frequently Asked Questions

What is CVE-2018-0786?
CVE-2018-0786 is a security vulnerability in Microsoft.NETCore.UniversalWindowsPlatform involving Improper Certificate Validation in Microsoft .NET Framework components under CWE-295: Improper Certificate Validation.
Which Microsoft.NETCore.UniversalWindowsPlatform versions are affected?
Affected versions include releases prior to 5.2.4, 5.3.5, 5.4.2, 6.0.6, 4.4.1, 4.3.1, 4.1.1, 4.0.2 across affected packages: Microsoft.NETCore.UniversalWindowsPlatform, System.ServiceModel.Primitives, System.ServiceModel.Http, System.ServiceModel.NetTcp, System.ServiceModel.Duplex, System.ServiceModel.Security, System.Private.ServiceModel.
What version fixes CVE-2018-0786?
Upgrading to 5.2.4, 5.3.5, 5.4.2, 6.0.6, 4.4.1, 4.3.1, 4.1.1, 4.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Microsoft.NETCore.UniversalWindowsPlatform affected?
Yes, Microsoft.NETCore.UniversalWindowsPlatform is affected in releases prior to 5.2.4, 5.3.5, 5.4.2, 6.0.6. Upgrade your dependency to 5.2.4, 5.3.5, 5.4.2, 6.0.6 or later.
Is System.ServiceModel.Primitives affected?
Yes, System.ServiceModel.Primitives is affected in releases prior to 4.4.1, 4.3.1, 4.1.1. Upgrade your dependency to 4.4.1, 4.3.1, 4.1.1 or later.
What is the CVSS score of CVE-2018-0786?
CVE-2018-0786 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-0786?
CVE-2018-0786 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check NuGet dependencies for CVE-2018-0786?
Run the dependency tree command: 'inspect dependencies for Microsoft.NETCore.UniversalWindowsPlatform'. 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-jc8g-xhw5-6x46",
  "modified" : "2022-07-07T21:42:15Z",
  "published" : "2018-10-16T19:59:05Z",
  "aliases" : [ "CVE-2018-0786" ],
  "summary" : "Improper Certificate Validation in Microsoft .NET Framework components",
  "details" : "Microsoft .NET Framework 2.0 SP2, 3.0 SP2, 3.5, 3.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, .NET Core 1.0 and 2.0, and PowerShell Core 6.0.0 allow a security feature bypass vulnerability due to the way certificates are validated, aka \".NET Security Feature Bypass Vulnerability.\"",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.NETCore.UniversalWindowsPlatform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "5.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.NETCore.UniversalWindowsPlatform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.NETCore.UniversalWindowsPlatform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.4.0"
      }, {
        "fixed" : "5.4.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.NETCore.UniversalWindowsPlatform"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.0.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Primitives"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Primitives"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Primitives"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ],
    "versions" : [ "4.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ],
    "versions" : [ "4.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.NetTcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.NetTcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.NetTcp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ],
    "versions" : [ "4.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Duplex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Duplex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Duplex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.1"
      }, {
        "fixed" : "4.0.2"
      } ]
    } ],
    "versions" : [ "4.0.1" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.ServiceModel.Security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.1"
      }, {
        "fixed" : "4.0.2"
      } ]
    } ],
    "versions" : [ "4.0.1" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.Private.ServiceModel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.1"
      } ]
    } ],
    "versions" : [ "4.4.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.Private.ServiceModel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.3.0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "versions" : [ "4.3.0" ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "System.Private.ServiceModel"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.1.0"
      }, {
        "fixed" : "4.1.1"
      } ]
    } ],
    "versions" : [ "4.1.0" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-0786"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dotnet/announcements/issues/51"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/issues/302"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-jc8g-xhw5-6x46"
  }, {
    "type" : "WEB",
    "url" : "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-0786"
  }, {
    "type" : "WEB",
    "url" : "https://www.nuget.org/packages/System.ServiceModel.Duplex#versions-body-tab"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:43:03Z",
    "nvd_published_at" : "2018-01-10T01:29:00Z"
  }
}