Command Injection Affecting github.com/rancher/rancher/pkg/git package, versions >=2.7.0 <2.7.1>=2.6.0 <2.6.10>=2.5.0 <2.5.17


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.24% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMRANCHERRANCHERPKGGIT-3248480
  • published26 Jan 2023
  • disclosed25 Jan 2023
  • creditSnyk Research Team

Introduced: 25 Jan 2023

CVE-2022-31249  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade github.com/rancher/rancher/pkg/git to version 2.7.1, 2.6.10, 2.5.17 or higher.

Overview

Affected versions of this package are vulnerable to Command Injection. Wrangler's Git package uses the underlying Git binary present in the host OS or container image to execute Git operations. Specially crafted commands can be passed to Wrangler that will change their behavior and cause confusion when executed through Git, resulting in command injection in the underlying host.

Workarounds

Sanitize input passed to the Git package to remove potentially unsafe and ambiguous characters. Otherwise, the best course of action is to update to a patched Wrangler version.

CVSS Scores

version 3.1