Miggo Logo

CVE-2022-31249: Command injection in Git package in Wrangler

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.7988%
Published
1/25/2023
Updated
6/13/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/rancher/wranglergo>= 0.8.6, < 0.8.110.8.11
github.com/rancher/wranglergo= 1.0.01.0.1
github.com/rancher/wranglergo< 0.7.4-security10.7.4-security1
github.com/rancher/wranglergo>= 0.8.0, < 0.8.5-security10.8.5-security1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper argument handling in Git command construction. The commit patches show critical additions of '--' argument separators and quoting fixes in multiple functions. These changes directly address command/argument injection vectors by: 1) Preventing user-controlled values (branch names, revisions) from being interpreted as Git options/flags, and 2) Fixing shell injection in credential helper configuration. The functions modified in the security patches are clearly identified as the vulnerable points where these injection vectors existed.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t * *omm*n* inj**tion vuln*r**ility w*s *is*ov*r** in Wr*n*l*r's *it p**k*** *****tin* v*rsions up to *n* in*lu*in* `v*.*.*`. Wr*n*l*r's *it p**k*** us*s t** un**rlyin* *it *in*ry pr*s*nt in t** *ost OS or *ont*in*r im*** to *x**ut* *it op

Reasoning

T** vuln*r**ility st*ms *rom improp*r *r*um*nt **n*lin* in *it *omm*n* *onstru*tion. T** *ommit p*t***s s*ow *riti**l ***itions o* '--' *r*um*nt s*p*r*tors *n* quotin* *ix*s in multipl* *un*tions. T**s* ***n**s *ir**tly ***r*ss *omm*n*/*r*um*nt inj**