# CVE-2024-22197: 0xJacky Nginx-UI command injection in Nginx settings API

Source: https://junglewise.ai/threats/cve-2024-22197-0xjacky-nginx-ui-command-injection-in-nginx-settings-api  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-01-11. Updated: 2026-07-06  
License: CC BY 4.0 with a link back

CVE-2024-22197 · Severity: high · CVSS 7.7 · Published 2024-01-11

Nginx-UI, a web-based management interface for Nginx servers, contains a vulnerability that allows any logged-in user to execute arbitrary commands on the underlying system. By sending a specially crafted request to the application's settings API, an attacker can modify internal system commands used for testing configurations. This could lead to a full system takeover, unauthorized access to sensitive data, or disruption of web services.

Technologies: [0xJacky Nginx-UI](https://junglewise.ai/threats/technologies/nginx-ui), [github.com/0xJacky/Nginx-UI (Go)](https://junglewise.ai/threats/technologies/github-com-0xjacky-nginx-ui). Vendors: [0xJacky](https://junglewise.ai/threats/vendors/0xjacky), [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2024-22197 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-22197 being exploited in the wild.

**How severe is CVE-2024-22197?** High severity, with a CVSS score of 7.7, published 11 January 2024.

**Which products and versions are affected?** 0xJacky Nginx-UI < 1.9.10-0.20231219184941-827e76c46e63; github.com/0xJacky/Nginx-UI (Go) < 1.9.10-0.20231219184941-827e76c46e63, SEMVER:introduced=0,fixed=1.9.10-0.20231219184941-827e76c46e63.

**Is there a fix for CVE-2024-22197?** Yes. github.com/0xJacky/Nginx-UI (Go): upgrade to 1.9.10-0.20231219184941-827e76c46e63 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-22197 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2024-22197?** Check whether you run 0xJacky Nginx-UI or github.com/0xJacky/Nginx-UI (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/0xJacky/Nginx-UI (Go): upgrade to 1.9.10-0.20231219184941-827e76c46e63 or later

  ```sh
  go get github.com/0xJacky/Nginx-UI@v1.9.10-0.20231219184941-827e76c46e63
  ```


## Technical details

A command injection vulnerability exists in Nginx-UI due to improper neutralization of user-controlled input in the settings API. While the web UI restricts certain fields, the `SaveSettings` function in `api/system/settings.go` allows authenticated users (regardless of role) to modify sensitive fields like `test_config_cmd`, `reload_cmd`, and `restart_cmd` via direct API requests. These fields are later passed to `exec.Command("/bin/sh", "-c", ...)` in the `execShell` function without sanitization. An attacker can trigger the execution of their injected command by performing actions that invoke a configuration test, such as adding a new site. The issue is patched in version 1.9.10-0.20231219184941-827e76c46e63.

## Affected products

- 0xJacky Nginx-UI < 1.9.10-0.20231219184941-827e76c46e63

## Identifiers

- CVE-2024-22197
- GHSA-pxmr-q2x3-9x9m
- GO-2024-2464

## Timeline

- 2024-01-11: advisory
- 2024-01-11: disclosed
- 2023-12-19: patched

## References

- [https://api.github.com/users/jorgectf](https://api.github.com/users/jorgectf)
- [https://github.com/jorgectf](https://github.com/jorgectf)
- [https://api.github.com/users/jorgectf/gists%7B/gist_id%7D](https://api.github.com/users/jorgectf/gists%7B/gist_id%7D)
- [https://api.github.com/users/jorgectf/repos](https://api.github.com/users/jorgectf/repos)
- [https://avatars.githubusercontent.com/u/46056498?v=4](https://avatars.githubusercontent.com/u/46056498?v=4)
- [https://api.github.com/users/jorgectf/events%7B/privacy%7D](https://api.github.com/users/jorgectf/events%7B/privacy%7D)

## Related threats

- [Nginx UI Casdoor SSO login CSRF via constant state parameter](https://junglewise.ai/threats/cve-2026-84312-nginx-ui-casdoor-sso-callback-uses-a-constant-state-parameter)
- [Nginx UI OTP secure-session step-up bypass via MCP](https://junglewise.ai/threats/cve-2026-84360-nginx-ui-otp-secure-session-step-up-can-be-bypassed-via-mcp)
- [Nginx UI short token cache bypass after account re-enable](https://junglewise.ai/threats/cve-2026-84321-nginx-ui-standalone-short-tokens-survive-administrative)
- [Nginx UI auto backup path traversal in storage boundary](https://junglewise.ai/threats/cve-2026-84320-nginx-ui-auto-backup-name-allows-path-traversal-outside-validated)
- [Nginx UI MCP configuration directive validation bypass](https://junglewise.ai/threats/cve-2026-84319-nginx-ui-mcp-configuration-tools-bypass-restricted-directive)
