Vulnerabilities in pkg:nuget/TGServiceInterface

PACKAGE
Advisory Identifier: GHSA-42r6-p4px-qvv6
Advisory Summary

CVE-2018-17107 is a HIGH (CVSS 8.3) tgstation-server cached user logins vulnerability (General Security Weakness) affecting TGServiceInterface libraries in the NuGet ecosystem. The issue involves tgstation-server cached user logins in legacy server. Remediation is available by upgrading affected packages to version 3.2.5.0.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/TGServiceInterface

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/TGServiceInterface. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-42r6-p4px-qvv6 CVE-2018-17107 HIGH tgstation-server cached user logins in legacy server
GHSA-7r36-jf3c-jhp4 - CRITICAL Duplicate Advisory: tgstation-server vulnerable to cached user logins in legacy server

CVE-2018-17107 at a Glance

CVE Identifier CVE-2018-17107
GHSA Identifier GHSA-42r6-p4px-qvv6
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification General Security Weakness
Affected Product TGServiceInterface
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 8.3

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

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

How to Fix CVE-2018-17107

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

TGServiceInterface fixed: 3.2.5.0
Upgrade TGServiceInterface to 3.2.5.0
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 TGServiceInterface

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-17107, inspect your project dependencies for TGServiceInterface:

inspect dependencies for TGServiceInterface

Analyze the terminal output to locate any version of TGServiceInterface in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.5.0), 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 TGServiceInterface, 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

Please note this advisory is for a historical preexisting issue in the legacy server from 2018. It has long since been triaged. It is being moved here for visibility. The text below is copied from the original issue #690 # You can login to the server with any username/password combination if someone else is logged in An explanation of the bug: Back in 3.2.1.0, in order to accommodate running the Control Panel using Mono some hooks were added to the WCF communication layer. Detailed in this commit: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733 The bug was in this line: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733R48 authPolicy is passed in by the framework but the documentation for what the parameter is is virtually non-existent: https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.serviceauthenticationmanager.authenticate?view=netframework-4.7.2#System_ServiceModel_ServiceAuthenticationManager_Authenticate_System_Collections_ObjectModel_ReadOnlyCollection_System_IdentityModel_Policy_IAuthorizationPolicy__System_Uri_System_ServiceModel_Channels_Message__ Turns out it is a cache of what the previously returned policy was, as Floyd thankfully found out for us. The security patch fixes the issue by creating a new empty list as the return value when password authentication fails as opposed to using the authPolicy parameter. If you're wondering why this line: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733R42 didn't prevent the issue. It only invalidated the actual Windows login session, but in the eyes of the server the user was still valid since we just passed that closed handle as a return result. Had access to static files been attempted with a bad login, the request would end up erroring due to trying to impersonate using a closed user token handle. This has been fixed in 1812a9c6793c8516c138a105ccfb2108164f0eff and versions 3.2.5.0+

CVE-2018-17107 Affected TGServiceInterface Versions

1 component(s)
Fixed Versions:
3.2.5.0
Product / Package Ecosystem Affected Versions Fixed Version
TGServiceInterface
NuGet
≥ 3.2.1.0
< 3.2.5.0
3.2.5.0

References

Frequently Asked Questions

What is CVE-2018-17107?
CVE-2018-17107 is a security vulnerability in TGServiceInterface involving tgstation-server cached user logins in legacy server under General Security Weakness.
Which TGServiceInterface versions are affected?
Affected versions include releases prior to 3.2.5.0 across affected packages: TGServiceInterface.
What version fixes CVE-2018-17107?
Upgrading to 3.2.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is TGServiceInterface affected?
Yes, TGServiceInterface is affected in releases prior to 3.2.5.0. Upgrade your dependency to 3.2.5.0 or later.
What is the CVSS score of CVE-2018-17107?
CVE-2018-17107 has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2018-17107?
CVE-2018-17107 is classified under General Security Weakness.
How can I check NuGet dependencies for CVE-2018-17107?
Run the dependency tree command: 'inspect dependencies for TGServiceInterface'. 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-42r6-p4px-qvv6",
  "modified" : "2023-06-12T20:30:27Z",
  "published" : "2023-06-12T20:30:27Z",
  "aliases" : [ "CVE-2018-17107" ],
  "summary" : "tgstation-server cached user logins in legacy server",
  "details" : "Please note this advisory is for a historical preexisting issue in the legacy server from 2018. It has long since been triaged. It is being moved here for visibility. The text below is copied from the original issue #690\n\n# You can login to the server with any username/password combination if someone else is logged in\n\nAn explanation of the bug: Back in 3.2.1.0, in order to accommodate running the Control Panel using Mono some hooks were added to the WCF communication layer. Detailed in this commit: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733 \n\nThe bug was in this line: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733R48\nauthPolicy is passed in by the framework but the documentation for what the parameter is is virtually non-existent: https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.serviceauthenticationmanager.authenticate?view=netframework-4.7.2#System_ServiceModel_ServiceAuthenticationManager_Authenticate_System_Collections_ObjectModel_ReadOnlyCollection_System_IdentityModel_Policy_IAuthorizationPolicy__System_Uri_System_ServiceModel_Channels_Message__\n\nTurns out it is a cache of what the previously returned policy was, as Floyd thankfully found out for us. The security patch fixes the issue by creating a new empty list as the return value when password authentication fails as opposed to using the authPolicy parameter.\n\nIf you're wondering why this line: https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733R42 didn't prevent the issue. It only invalidated the actual Windows login session, but in the eyes of the server the user was still valid since we just passed that closed handle as a return result. Had access to static files been attempted with a bad login, the request would end up erroring due to trying to impersonate using a closed user token handle.\n\nThis has been fixed in 1812a9c6793c8516c138a105ccfb2108164f0eff and versions 3.2.5.0+\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "TGServiceInterface"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.1.0"
      }, {
        "fixed" : "3.2.5.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.4.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tgstation/tgstation-server/security/advisories/GHSA-42r6-p4px-qvv6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17107"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tgstation/tgstation-server/commit/1812a9c6793c8516c138a105ccfb2108164f0eff"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tgstation/tgstation-server/commit/2894ea03d708c7f16bab47ba5020c2ad4c3d5554#diff-0ba090ea7073a3a304dfdbdfc512f733"
  }, {
    "type" : "WEB",
    "url" : "https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.serviceauthenticationmanager.authenticate?view=netframework-4.7.2#System_ServiceModel_ServiceAuthenticationManager_Authenticate_System_Collections_ObjectModel_ReadOnlyCollection_System_IdentityModel_Policy_IAuthorizationPolicy__System_Uri_System_ServiceModel_Channels_Message__"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tgstation/tgstation-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tgstation/tgstation-server/blob/tgstation-server-v3.2.5.0/TGS.Interface/TGS.Interface.nuspec"
  }, {
    "type" : "WEB",
    "url" : "https://www.nuget.org/packages/TGServiceInterface"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-12T20:30:27Z",
    "nvd_published_at" : null
  }
}