Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/stacklok/minder
  4. ›
  5. GHSA-hpcg-xjq5-g666

GHSA-hpcg-xjq5-g666: Minder affected by denial of service from maliciously configured Git repository

June 18, 2024

Minder’s Git provider is vulnerable to a denial of service from a maliciously configured GitHub repository. The Git provider clones users repositories using the github.com/go-git/go-git/v5 library on these lines:

https://github.com/stacklok/minder/blob/85985445c8ac3e51f03372e99c7b2f08a6d274aa/internal/providers/git/git.go#L55-L89

The Git provider does the following on these lines:

First, it sets the CloneOptions, specifying the url, the depth etc:

https://github.com/stacklok/minder/blob/85985445c8ac3e51f03372e99c7b2f08a6d274aa/internal/providers/git/git.go#L56-L62

It then validates the options:

https://github.com/stacklok/minder/blob/85985445c8ac3e51f03372e99c7b2f08a6d274aa/internal/providers/git/git.go#L66-L68

It then sets up an in-memory filesystem, to which it clones:

https://github.com/stacklok/minder/blob/85985445c8ac3e51f03372e99c7b2f08a6d274aa/internal/providers/git/git.go#L70-L71

Finally, it clones the repository:

https://github.com/stacklok/minder/blob/85985445c8ac3e51f03372e99c7b2f08a6d274aa/internal/providers/git/git.go#L77

This (g *Git) Clone() method is vulnerable to a DoS attack: A Minder user can instruct Minder to clone a large repository which will exhaust memory and crash the Minder server. The root cause of this vulnerability is a combination of the following conditions:

  1. Users can control the Git URL which Minder clones.
  2. Minder does not enforce a size limit to the repository.
  3. Minder clones the entire repository into memory.

References

  • github.com/advisories/GHSA-hpcg-xjq5-g666
  • github.com/stacklok/minder
  • github.com/stacklok/minder/commit/35bab8f9a6025eea9e6e3cef6bd80707ac03d2a9
  • github.com/stacklok/minder/security/advisories/GHSA-hpcg-xjq5-g666

Code Behaviors & Features

Detect and mitigate GHSA-hpcg-xjq5-g666 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.52

Fixed versions

  • 0.0.52

Solution

Upgrade to version 0.0.52 or above.

Impact 5.7 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

go/github.com/stacklok/minder/GHSA-hpcg-xjq5-g666.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 12 May 2025 12:15:23 +0000.