CVE-2026-33027: Nginx Configuration Directory Vulnerable to Recursive Deletion via Improper Path Validation
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.
Published Mar 30, 2026
Affected packages
github.com/0xJacky/Nginx-UI
- Ecosystem
- Go
- Affected
- <= 1.99
- Fixed in
- No patched version yet
- Check
go list -m github.com/0xJacky/Nginx-UI
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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*
- 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:
- Reload the website and check that the /etc/nginx folder has been completely removed:
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.
Credited to dapickle.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-84312
Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)
high7.1Oct 15, 2026CVE-2026-84313
Nginx UI: TOTP / passkey enrolment requires no re-authentication, enabling persistent account takeover
high8.8Oct 15, 2026CVE-2026-84314
Nginx UI: Account Takeover via Missing `RequireSecureSession` on User Management Endpoint
high8.7Oct 15, 2026CVE-2026-84315
Nginx UI OTP secure-session step-up is missing on sensitive mutation routes
high8.3Oct 15, 2026CVE-2026-84316
Nginx UI: nginx config directive denylist (ValidateConfigFile) is bypassable via same-line ";" separation → authenticated directive injection (RCE on the official image)
high8.8Oct 15, 2026CVE-2026-84317
Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)
high8.8Oct 15, 2026
