Skip to content

Command injection in Git package in Wrangler

High severity GitHub Reviewed Published Jan 25, 2023 in rancher/wrangler • Updated Jun 13, 2023

Package

gomod github.com/rancher/wrangler (Go)

Affected versions

>= 0.8.6, < 0.8.11
= 1.0.0
< 0.7.4-security1
>= 0.8.0, < 0.8.5-security1

Patched versions

0.8.11
1.0.1
0.7.4-security1
0.8.5-security1

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:

References

@macedogm macedogm published to rancher/wrangler Jan 25, 2023
Published to the GitHub Advisory Database Jan 25, 2023
Reviewed Jan 25, 2023
Published by the National Vulnerability Database Feb 7, 2023
Last updated Jun 13, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

EPSS score

0.236%
(62nd percentile)

CVE ID

CVE-2022-31249

GHSA ID

GHSA-qrg7-hfx7-95c5

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.