All vulnerabilities

Servers and applications

GHSA-746f-pjq6-cc8p

Post-Authentication RCE via Backup Restore Overwriting Command Execution Settings

Severity
High
Published
12 Aug 2026
Last changed
12 Aug 2026
Added to UpHeron
3 Nov 2026
Fixed in
2.5.0
Weakness
OS command injection (CWE-78)
Sources
Project advisories (GitHub)

Description

The backup restore handler at internal/backup/restore.go copies attacker-controlled app.ini content to disk without validating or sanitizing individual settings fields. Five command execution sinks read their executables from app.ini settings: TestConfigCmd, ReloadCmd, RestartCmd, logrotate CMD, and terminal StartCmd. The logrotate CMD is auto-triggered on a configurable timer (default 24 hours), achieving persistent RCE without further user interaction.

At internal/backup/restore.go:468, the restore function copies the backup's app.ini directly to the application configuration path:

After restore, risefront.Restart() at api/backup/restore.go:136 reloads settings from the new app.ini.

The five command execution sinks that read from app.ini:

  • internal/nginx/nginx.go:29 -- TestConfig() calls execShell(settings.NginxSettings.TestConfigCmd), which at internal/nginx/exec.go:18 runs exec.Command("/bin/sh", "-c", cmd). Triggered via POST /api/nginx/test.
From 0xJacky/nginx-ui's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
Nginx UIServers and applications · github:0xjacky/nginx-ui
  • From 2.0.0 before 2.5.0

About Nginx UI

Yet another WebUI for Nginx

From its GitHub repository.
Docker Hub pulls
1,512,532Docker Hub, 15 Nov 2026
GitHub stars
11,783GitHub, 15 Nov 2026
Forks
921GitHub, 15 Nov 2026
Latest release
v3.0.3GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
License
AGPL-3.0GitHub
First published on GitHub
19 Feb 2021GitHub

References