Miggo Logo

CVE-2024-22198: Authenticated (user role) arbitrary command execution by modifying `start_cmd` setting (GHSL-2023-268)

7.1

CVSS Score
3.1

Basic Information

EPSS Score
0.96022%
Published
1/11/2024
Updated
1/11/2024
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:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/0xJacky/Nginx-UIgo< 2.0.0.beta.92.0.0.beta.9

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability chain requires two key functions:

  1. SaveSettings (api/system/settings.go) was vulnerable because it allowed any authenticated user to overwrite protected settings like start_cmd due to missing field-level authorization checks. The pre-patch code directly assigned json.Server to settings.ServerSettings.
  2. NewPipeLine (internal/pty/pipeline.go) was vulnerable as it executed the user-controlled StartCmd value via exec.Command. The combination of these functions enabled command injection. The patch added protected field filtering in SaveSettings and hardened the settings structure to prevent overwrites.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry N*inx-UI is * w** int*r**** to m*n*** N*inx *on*i*ur*tions. It is vuln*r**l* to *r*itr*ry *omm*n* *x**ution *y **usin* t** *on*i*ur*tion s*ttin*s. ### **t*ils T** `*om* > Pr***r*n**` p*** *xpos*s * list o* syst*m s*ttin*s su** *s `Run Mo

Reasoning

T** vuln*r**ility ***in r*quir*s two k*y *un*tions: *. S*v*S*ttin*s (*pi/syst*m/s*ttin*s.*o) w*s vuln*r**l* ****us* it *llow** *ny *ut**nti**t** us*r to ov*rwrit* prot**t** s*ttin*s lik* st*rt_*m* *u* to missin* *i*l*-l*v*l *ut*oriz*tion ****ks. T**