Vulnerabilities in pkg:nuget/Masuit.Tools.Core

PACKAGE
Advisory Identifier: GHSA-vh38-ghx6-vmvg
Advisory Summary

CVE-2022-21167 is a HIGH (CVSS 7.5) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Masuit.Tools.Core libraries in the NuGet ecosystem. The issue involves code injection in masuit.tools.core. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/Masuit.Tools.Core

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-vh38-ghx6-vmvg CVE-2022-21167 HIGH Code Injection in Masuit.Tools.Core

CVE-2022-21167 at a Glance

CVE Identifier CVE-2022-21167
GHSA Identifier GHSA-vh38-ghx6-vmvg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Masuit.Tools.Core
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:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2022-21167

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

Masuit.Tools.Core fixed: Latest secure release
Upgrade Masuit.Tools.Core to Latest secure release
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 Masuit.Tools.Core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-21167, inspect your project dependencies for Masuit.Tools.Core:

inspect dependencies for Masuit.Tools.Core

Analyze the terminal output to locate any version of Masuit.Tools.Core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Masuit.Tools.Core, 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

All versions of package Masuit.Tools.Core are vulnerable to Arbitrary Code Execution via the ReceiveVarData<T> function in the SocketClient.cs component. The socket client in the package can pass in the payload via the user-controllable input after it has been established, because this socket client transmission does not have the appropriate restrictions or type bindings for the BinaryFormatter.

CVE-2022-21167 Affected Masuit.Tools.Core Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
Masuit.Tools.Core
NuGet
≤ 2.4.8.6

References

Frequently Asked Questions

What is CVE-2022-21167?
CVE-2022-21167 is a security vulnerability in Masuit.Tools.Core involving Code Injection in Masuit.Tools.Core under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Masuit.Tools.Core versions are affected?
Affected versions include releases prior to current release patches across affected packages: Masuit.Tools.Core.
What version fixes CVE-2022-21167?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is Masuit.Tools.Core affected?
Yes, Masuit.Tools.Core is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2022-21167?
CVE-2022-21167 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-21167?
CVE-2022-21167 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check NuGet dependencies for CVE-2022-21167?
Run the dependency tree command: 'inspect dependencies for Masuit.Tools.Core'. 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-vh38-ghx6-vmvg",
  "modified" : "2022-05-23T19:41:26Z",
  "published" : "2022-05-03T00:00:46Z",
  "aliases" : [ "CVE-2022-21167" ],
  "summary" : "Code Injection in Masuit.Tools.Core",
  "details" : "All versions of package Masuit.Tools.Core are vulnerable to Arbitrary Code Execution via the ReceiveVarData<T> function in the SocketClient.cs component. The socket client in the package can pass in the payload via the user-controllable input after it has been established, because this socket client transmission does not have the appropriate restrictions or type bindings for the BinaryFormatter.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Masuit.Tools.Core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.4.8.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-21167"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ldqk/Masuit.Tools"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ldqk/Masuit.Tools/blob/327f42b9f20f25bb66188672199c8265fc968d91/Masuit.Tools.Abstractions/Net/SocketClient.cs%23L197"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-DOTNET-MASUITTOOLSCORE-2316875"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-23T19:41:26Z",
    "nvd_published_at" : "2022-05-01T16:15:00Z"
  }
}