Vulnerabilities in pkg:golang/github.com/github/git-sizer

PACKAGE
Advisory Summary

GHSA-57q7-rxqq-7vgp is a MODERATE on windows, `git-sizer` might run vulnerability (General Security Weakness) affecting Github.com/github/git sizer libraries in the Go ecosystem. The issue involves on windows, `git-sizer` might run a `git` executable within the repository being analyzed. Remediation is available by upgrading affected packages to version 1.4.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/github/git-sizer

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/github/git-sizer. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-57q7-rxqq-7vgp - MODERATE On Windows, `git-sizer` might run a `git` executable within the repository being analyzed

GHSA-57q7-rxqq-7vgp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-57q7-rxqq-7vgp
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/github/git sizer
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-57q7-rxqq-7vgp

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

github.com/github/git-sizer fixed: 1.4.0
Upgrade github.com/github/git-sizer to 1.4.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 github.com/github/git-sizer

How to Check if You Are Affected

To determine whether your application is affected by GHSA-57q7-rxqq-7vgp, inspect your project dependencies for Github.com/github/git sizer:

inspect dependencies for github.com/github/git-sizer

Analyze the terminal output to locate any version of Github.com/github/git sizer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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 Github.com/github/git sizer, 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

### Impact On Windows, if `git-sizer` is run against a non-bare repository, and that repository has an executable called `git.exe`, `git.bat`, etc., then that executable might be run by `git-sizer` rather than the system `git` executable. An attacker could try to use social engineering to get a victim to run `git-sizer` against a hostile repository and thereby get the victim to run arbitrary code. On Linux or other Unix-derived platforms, a similar problem could occur if the user's `PATH` has the current directory before the path to the standard `git` executable, but this is would be a very unusual configuration that has been known for decades to lead to all kinds of security problems. ### Patches Users should update to git-sizer v1.4.0 ### Workarounds If you are on Windows, then either * Don't run `git-sizer` against a repository that might contain hostile code, or, if you must… * Run `git-sizer` against a bare clone of the hostile repository, or, if that is not possible… * Make sure that the hostile repository doesn't have an executable in its top-level directory before running `git-sizer`. If you are on Linux or other Unix-based system, then (for myriad reasons!) don't add the current directory to your `PATH`. ### References * [Command PATH security in Go](https://blog.golang.org/path-security) ### For more information If you have any questions or comments about this advisory: * Open an issue in [the `git-sizer` project](https://github.com/github/git-sizer). * Email us at [GitHub support](mailto:support@github.com).

GHSA-57q7-rxqq-7vgp Affected Github.com/github/git sizer Versions

1 component(s)
Fixed Versions:
1.4.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/github/git-sizer
Go
< 1.4.0
1.4.0

References

Frequently Asked Questions

What is GHSA-57q7-rxqq-7vgp?
GHSA-57q7-rxqq-7vgp is a security vulnerability in Github.com/github/git sizer involving On Windows, `git-sizer` might run a `git` executable within the repository being analyzed under General Security Weakness.
Which Github.com/github/git sizer versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: github.com/github/git-sizer.
What version fixes GHSA-57q7-rxqq-7vgp?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/github/git-sizer affected?
Yes, github.com/github/git-sizer is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What CWE is associated with GHSA-57q7-rxqq-7vgp?
GHSA-57q7-rxqq-7vgp is classified under General Security Weakness.
How can I check Go dependencies for GHSA-57q7-rxqq-7vgp?
Run the dependency tree command: 'inspect dependencies for github.com/github/git-sizer'. 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-57q7-rxqq-7vgp",
  "modified" : "2021-05-18T21:39:10Z",
  "published" : "2022-02-15T01:57:18Z",
  "aliases" : [ ],
  "summary" : "On Windows, `git-sizer` might run a `git` executable within the repository being analyzed",
  "details" : "### Impact\nOn Windows, if `git-sizer` is run against a non-bare repository, and that repository has an executable called `git.exe`, `git.bat`, etc., then that executable might be run by `git-sizer` rather than the system `git` executable. An attacker could try to use social engineering to get a victim to run `git-sizer` against a hostile repository and thereby get the victim to run arbitrary code.\n\nOn Linux or other Unix-derived platforms, a similar problem could occur if the user's `PATH` has the current directory before the path to the standard `git` executable, but this is would be a very unusual configuration that has been known for decades to lead to all kinds of security problems.\n\n### Patches\nUsers should update to git-sizer v1.4.0\n\n### Workarounds\nIf you are on Windows, then either\n* Don't run `git-sizer` against a repository that might contain hostile code, or, if you must…\n* Run `git-sizer` against a bare clone of the hostile repository, or, if that is not possible…\n* Make sure that the hostile repository doesn't have an executable in its top-level directory before running `git-sizer`.\n\nIf you are on Linux or other Unix-based system, then (for myriad reasons!) don't add the current directory to your `PATH`.\n\n### References\n* [Command PATH security in Go](https://blog.golang.org/path-security)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the `git-sizer` project](https://github.com/github/git-sizer).\n* Email us at [GitHub support](mailto:support@github.com).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/github/git-sizer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.3.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/github/git-sizer/security/advisories/GHSA-57q7-rxqq-7vgp"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/git-sizer/commit/38400d6ddd79325e956b00ff584cfcc8dd96d536"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-18T21:39:10Z",
    "nvd_published_at" : null
  }
}