GHSA-m8p8-53vf-8357 — Nginx-UI
GHSA-m8p8-53vf-8357 is a Path Traversal vulnerability in github.com/0xJacky/Nginx-UI. No vendor fix is recorded yet; mitigation options are listed below.
Nginx Configuration Directory Vulnerable to Recursive Deletion via Improper Path Validation
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-m8p8-53vf-8357.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
github.com/0xJacky/Nginx-UIReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The nginx-ui configuration improperly handles URL-encoded traversal sequences. When specially crafted paths are supplied, the backend resolves them to the base Nginx configuration directory and executes the operation on the base directory (/etc/nginx). In particular, this allows an authenticated user to remove the entire /etc/nginx directory, resulting in a partial Denial of Service.
Details
The file deletion logic fails to correctly validate and normalize paths containing URL-encoded traversal sequences such as ..%252F.
When such input is processed, the internal path resolution logic attempts to clamp the path into the allowed configuration directory. Instead of rejecting the traversal attempt, the clamping mechanism resolves the path to the base Nginx configuration directory itself.
Because the deletion handler invokes os.RemoveAll, which recursively removes directories, this results in the deletion of the entire /etc/nginx directory.
This behavior creates a dangerous interaction between path normalization and deletion logic:
- Traversal sequences are not rejected.
- Double-encoding (
..%252F) is used to bypass initial shallow filters. - The clamping mechanism resolves malicious paths to the base configuration directory.
- The deletion handler recursively deletes the resolved path.
As a result, an attacker can trigger deletion of the entire Nginx configuration directory instead of being blocked by path validation logic.
Root Cause
The vulnerability results from a combination of design flaws:
- Improper Path Canonicalization: URL-encoded traversal sequences are not properly rejected.
- Unsafe Fallback Logic: The
GetConfPathclamping mechanism returns the base configuration directory when traversal is detected instead of rejecting the request. - Unsafe Deletion Primitive: The deletion handler invokes
os.RemoveAll, which recursively deletes directories without additional safeguards. (delete.go)
// Delete the file or directory
err = os.RemoveAll(fullPath)
if err != nil {
cosy.ErrHandler(c, err)
return
}
This interaction causes the deletion operation to target the most sensitive directory when a traversal attempt occurs.
Environment
- Server OS: Kali Linux 6.17.10-1kali1 (6.17.10+kali-amd64)
- Nginx UI Version: nginx-ui v2.3.3
- Deployment: Docker / Default installation
Proof of Concept
Steps to Reproduce
-
Log into nginx-ui.
-
Go to Manage Configs and create a Folder named ..%252F..%252F..%252F..%252Ftest
<img width="1608" height="559" alt="image" src="https://github.com/user-attachments/assets/738d7d65-7e13-48fa-affc-d5509c43900f" /> -
Observe that the backend resolves the path to /etc/nginx..
-
Now lets create a file called testing.
-
Save it and rename it to ..%252F..%252F..%252F..%252Ftest (It is not possible to create it directly with the payload name so we have to rename it)
-
Go back to manage configs and Click Delete to remove the file we just created.
-
Check that there is an error:
<img width="1578" height="696" alt="image" src="https://github.com/user-attachments/assets/51a36310-0676-4fe5-b80c-e0199498efbf" /> -
Reload the website and check that the /etc/nginx folder has been completely removed:
<img width="1313" height="722" alt="image" src="https://github.com/user-attachments/assets/0a9ddd1b-786b-4cf2-8abd-1dc6f3a77807" />
Impact
An authenticated user capable of invoking the configuration deletion endpoint can trigger the recursive deletion of the entire Nginx configuration directory (/etc/nginx).
This results in:
- Immediate failure of the Nginx service due to missing configuration files.
- Loss of all Nginx configuration managed by nginx-ui.
- Denial of Service for all web services relying on the affected Nginx instance.
As the deletion operation uses a recursive filesystem call, the entire configuration directory is removed, leaving the system unable to restart Nginx until the configuration is manually restored.
A patched version is available at https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.4.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/0xJacky/Nginx-UI | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/0xJacky/Nginx-UI, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
No patched version of github.com/0xJacky/Nginx-UI has shipped for GHSA-m8p8-53vf-8357 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-m8p8-53vf-8357 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-m8p8-53vf-8357. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-m8p8-53vf-8357 in your dependencies?
O3 Security finds GHSA-m8p8-53vf-8357 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.