Command injection in Git package in Wrangler

Overview

Source
ID
GHSA-qrg7-hfx7-95c5
Aliases
CVE-2022-31249
GO-2023-1519

Description

### Impact

A command injection vulnerability was discovered in Wrangler's Git package affecting versions up to and including `v1.0.0`.

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

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

### Patches

Patched versions include `v1.0.1` and later and the backported tags - `v0.7.4-security1`, `v0.8.5-security1` and `v0.8.11`.

### For more information

If you have any questions or comments about this advisory:

* Reach out to [SUSE Rancher Security team](https://github.com/rancher/rancher/security/policy) for security related inquiries. * Open an issue in [Rancher](https://github.com/rancher/rancher/issues/new/choose) or [Wrangler](https://github.com/rancher/wrangler/issues/new) repository. * Verify our [support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) and [product support lifecycle](https://www.suse.com/lifecycle/).

Summary

339
Total packages affected
Packages with at least one version that is affected by the advisory or has an affected dependency.
56
Packages with a known fix
Packages with versions affected by the advisory that have a greater version that is not affected.
0.03%
Total ecosystem affected
The proportion of packages in the ecosystem that are affected by the advisory (fixed or not).
Affected Version: Introduced: 0, Fixed: 0.7.4-security1, Introduced: 0.8.0, Fixed: 0.8.5-security1, Introduced: 1.0.0, Fixed: 1.0.1, Introduced: 0.8.6, Fixed: 0.8.11
Patched/Unaffected
v0.7.5
v0.8.5
v0.8.11
v1.0.1
v1.0.2
v1.1.0
v1.1.1
v1.1.2
Affected
v1.0.0
v0.8.10
v0.8.9
v0.8.8
v0.8.7
v0.8.6
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.2
v0.7.1
v0.7.0
v0.6.2
v0.6.1
v0.6.0
v0.5.3
v0.5.2
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.3.1
v0.3.0
v0.2.0
v0.1.6
v0.1.5
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0