Vulnerabilities in pkg:nuget/moq

PACKAGE
Advisory Summary

GHSA-6r78-m64m-qwcf is a LOW moq v4.20.0-rc to 4.20.1 share vulnerability (General Security Weakness) affecting Moq libraries in the NuGet ecosystem. The issue involves moq v4.20.0-rc to 4.20.1 share hashed user data. Remediation is available by upgrading affected packages to version 4.20.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/moq

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-6r78-m64m-qwcf - LOW Moq v4.20.0-rc to 4.20.1 share hashed user data

GHSA-6r78-m64m-qwcf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6r78-m64m-qwcf
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Moq
Package Ecosystem NuGet
Published Date
Last Updated

How to Fix GHSA-6r78-m64m-qwcf

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

moq fixed: 4.20.2
Upgrade moq to 4.20.2
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 moq

How to Check if You Are Affected

To determine whether your application is affected by GHSA-6r78-m64m-qwcf, inspect your project dependencies for Moq:

inspect dependencies for moq

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

Moq v4.20.0-rc to 4.20.1 include support for [SponsorLink](https://github.com/devlooped/SponsorLink), which runs an obfuscated DLL at build time that scans local `git config` data and shares the user's hashed email address with SponsorLink's remote servers. There is no option to disable this. Moq v4.20.2 has removed this functionality.

GHSA-6r78-m64m-qwcf Affected Moq Versions

1 component(s)
Fixed Versions:
4.20.2
Product / Package Ecosystem Affected Versions Fixed Version
moq
NuGet
≥ 4.20.0-rc
< 4.20.2
4.20.2

References

Frequently Asked Questions

What is GHSA-6r78-m64m-qwcf?
GHSA-6r78-m64m-qwcf is a security vulnerability in Moq involving Moq v4.20.0-rc to 4.20.1 share hashed user data under General Security Weakness.
Which Moq versions are affected?
Affected versions include releases prior to 4.20.2 across affected packages: moq.
What version fixes GHSA-6r78-m64m-qwcf?
Upgrading to 4.20.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is moq affected?
Yes, moq is affected in releases prior to 4.20.2. Upgrade your dependency to 4.20.2 or later.
What CWE is associated with GHSA-6r78-m64m-qwcf?
GHSA-6r78-m64m-qwcf is classified under General Security Weakness.
How can I check NuGet dependencies for GHSA-6r78-m64m-qwcf?
Run the dependency tree command: 'inspect dependencies for moq'. 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-6r78-m64m-qwcf",
  "modified" : "2023-08-25T18:58:25Z",
  "published" : "2023-08-10T19:25:23Z",
  "aliases" : [ ],
  "summary" : "Moq v4.20.0-rc to 4.20.1 share hashed user data",
  "details" : "Moq v4.20.0-rc to 4.20.1 include support for [SponsorLink](https://github.com/devlooped/SponsorLink), which runs an obfuscated DLL at build time that scans local `git config` data and shares the user's hashed email address with SponsorLink's remote servers. There is no option to disable this.\n\nMoq v4.20.2 has removed this functionality.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "moq"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.20.0-rc"
      }, {
        "fixed" : "4.20.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/moq/moq/issues/1374"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moq/moq/pull/1363"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/moq/moq/pull/1375"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/moq/moq"
  }, {
    "type" : "WEB",
    "url" : "https://www.cazzulino.com/sponsorlink.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-10T19:25:23Z",
    "nvd_published_at" : null
  }
}