Record summary

CVE-2026-42221 has a selected CVSS score of 8.1 (high); EIP currently links 1 repository PoC and 2 lab environments.

Description

Nginx UI is a web user interface for the Nginx web server. From version 2.0.0 to before version 2.3.8, an unauthenticated network attacker can claim the initial administrator account on a fresh nginx-ui instance during the first-run setup window. The public /api/install endpoint is reachable without authentication, and the request-encryption flow only protects payload confidentiality in transit; it does not authenticate who is allowed to perform installation. A remote attacker who reaches the service before the legitimate operator can set the admin email, username, and password, causing permanent initial-instance takeover. This issue has been patched in version 2.3.8.

Description source: CVE List

Exploitation context

Available material

Repository PoCs
1
Lab environments
2

CISA SSVC decision

ExploitationPoC
AutomatableNo
Technical impactTotal

CISA Coordinator · SSVC 2.0.3 · Evaluated May 5, 2026 · Source: CVE List

Affected products and versions

2
ProductSourceVersion rangeStatus
CVE List>= 2.0.0, < 2.3.8affected

github.com/0xJacky/Nginx-UI

Browse Go / github.com/0xJacky/Nginx-UI
GitHub Advisory2.0.0 to < 2.3.8 · Fixed in 2.3.8affected

Proofs of concept

1

Repository PoCs

GitHubfuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-Repository PoCby fuchiuebusi-labStars: 0Exploit16 files

23.9 KiB · linked to 2 vulnerabilities

GitHub

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

The artifact contains a Python script (exploit_42221.py) that actively exploits CVE-2026-42221 by sending a crafted POST request to the unauthenticated /api/install endpoint of a vulnerable nginx-ui instance to create an attacker-controlled administrator account.

Backdoor review

No backdoor observed in reviewed code

The reviewed evidence consists of a README and a Python exploit script for CVE-2026-42221. The README describes a lab environment for testing two known nginx-ui CVEs. The exploit script performs the documented unauthenticated admin account claim against a local test instance. No concealed executable behavior, persistence, credential exfiltration, or unrelated payloads were observed. The script's actions are consistent with the stated CVE proof-of-concept.

ClassificationExploit
Model confidence100%
AuthenticationNot required
LanguagesPython
Target softwarenginx-ui
Attack typesauthentication bypassaccount takeover
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The script exploit_42221.py performs all steps required to exploit CVE-2026-42221: it interacts with the vulnerable endpoint, encrypts attacker-chosen credentials, and sends them to create an unauthorized administrator account. This is active exploitation, not mere detection or scanning.

scripts/exploit_42221.py:1-77README.md:50

Requirements

  • A vulnerable nginx-ui instance (v2.3.7 or earlier) must be running and accessible at payload withheld, and it must not have been set up yet (lock=false).scripts/exploit_42221.py:9scripts/exploit_42221.py:30-36
  • The attacker must have network access to the target instance.scripts/exploit_42221.py:9
  • The Python pycryptodome library must be installed to perform RSA encryption.README.md:63-67scripts/exploit_42221.py:6-7

Observed behavior

  • Checks the /api/install endpoint to confirm the target is in an uninitialized state (lock=false).scripts/exploit_42221.py:30-36
  • Retrieves the RSA public key from the /api/crypto/public_key endpoint.scripts/exploit_42221.py:39-45
  • Constructs a JSON payload containing attacker-controlled username, password, and email, then encrypts it with the retrieved RSA public key.scripts/exploit_42221.py:48-63
  • Sends the encrypted payload to the /api/install endpoint via an unauthenticated POST request to create the administrator account.scripts/exploit_42221.py:66-69
  • Reports success if the HTTP response status is 200/201 or the JSON response code is 0, indicating the attacker account was created.scripts/exploit_42221.py:71-75
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Script
Payload withheldPython script that exploits CVE-2026-42221 by claiming the initial admin account on a local nginx-ui instance via the unauthenticated /api/install endpoint.scripts/exploit_42221.py:1-77
Target Url
Payload withheldThe exploit script targets a local nginx-ui instance, consistent with the README's instructions for a local Docker lab environment.scripts/exploit_42221.py:9
Attacker Credentials
Payload withheldHardcoded credentials used by the exploit to create the admin account. These are used locally and do not indicate exfiltration.scripts/exploit_42221.py:10-12
Review boundaries

What the analysis did not establish

  • Only 2 of 16 text files in the repository were included in the evidence packet. The remaining 14 files (including scripts/encrypt_password.py, scripts/test_patched.py, Dockerfiles, and configuration files) were omitted, so the full scope of the repository cannot be assessed.
  • The evidence packet reports complete_artifact_coverage as false, indicating that not all artifacts from the repository snapshot are represented.
  • Only 2 of 16 repository files were provided as text; the remaining 14 files (including other scripts, Dockerfiles, and configuration files) were not inspected. The verdict applies only to the reviewed README.md and payload withheld.
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

Docker lab environments

2
GitHub

nginx_lab/docker-compose.yml

fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-Created
Model review verdict: Suspicious behavior.Vuln labCVE-2026-42221CVE-2026-42238Compose · builds

1 Compose manifest · 1 Dockerfile · 1 service

AnalysisSuspicious behaviordeepseek-v4-pro:cloud ·

Environment assessment

A Docker Compose environment for reproducing and verifying two CVEs (CVE-2026-42221 and CVE-2026-42238) in nginx-ui v2.3.7. It builds a custom image based on uozi/nginx-ui:v2.3.7, adds required directories and configuration files, and exposes the nginx-ui web interface on localhost:8080. The Docker socket is mounted into the container.

README.md:1-3nginx_lab/docker-compose.yml:1-12nginx_lab/Dockerfile:1-16

Lab assessment

Vulnerability lab

The README explicitly states the repository is for verifying two CVEs in nginx-ui using Docker. The Dockerfile builds a vulnerable version (v2.3.7) and the Compose file sets up a local test environment. All components are configured to demonstrate the described vulnerabilities.

README.md:1-3README.md:7-8
Lab shapeCompose · builds
Services1
Compose manifests1
Dockerfiles1
Evidence & reasoningComponents · CVE assessment · exercise context · review boundaries
Components

Services and files described by the evidence

nginx-ui

vulnerable targetweb-based Nginx management interface

A containerized instance of nginx-ui v2.3.7, a web GUI for managing Nginx. It is built from a custom Dockerfile that adds necessary directories and configuration files to prevent a startup loop. The service listens on container port 9000, mapped to host 127.0.0.1:8080. It mounts a named volume for /etc/nginx-ui and the host's Docker socket at /var/run/docker.sock.

nginx_lab/docker-compose.yml:2-9nginx_lab/Dockerfile:1-16README.md:7-8

entrypoint.sh

initialization scriptconfiguration copier

A shell script set as the container ENTRYPOINT. On first run, if /etc/nginx-ui/app.ini does not exist, it creates the directory and copies the template from /init-app.ini. Then it executes the original /init process from the base image.

nginx_lab/entrypoint.sh:1-8nginx_lab/Dockerfile:14-15

init-app.ini

default configuration template

A template for the nginx-ui application configuration file (app.ini). It sets the server port to 9000, defines Nginx paths, and configures logging and database settings. It is copied into the container and used by entrypoint.sh to initialize /etc/nginx-ui/app.ini if missing.

nginx_lab/init-app.ini:1-28nginx_lab/Dockerfile:10-11nginx_lab/entrypoint.sh:3-5

nginx.conf

Nginx configuration file

A custom Nginx configuration file that includes directories for sites-enabled, stream-enabled, and streams-enabled. It is copied into the container to replace the default configuration, ensuring the nginx-ui service can start without errors.

nginx_lab/nginx.conf:1-29nginx_lab/Dockerfile:8-9
CVE assessment

How the supplied evidence relates each vulnerability

CVE-2026-42221

Supported by supplied evidence

The README describes CVE-2026-42221 as unauthenticated admin account takeover via the /api/install endpoint before setup. The environment uses the vulnerable version v2.3.7, and the README provides a reproduction script (exploit_42221.py) and steps to verify the vulnerability.

README.md:7-8README.md:25-26README.md:77-82

CVE-2026-42238

Supported by supplied evidence

The README describes CVE-2026-42238 as unauthenticated command execution via backup restore of a malicious app.ini. The environment uses the vulnerable version v2.3.7, and the README explains the vulnerability and its root cause. Although no dedicated exploit script is shown in the provided evidence, the lab setup and description align with the CVE claim.

README.md:7-8README.md:27-28README.md:30
Exercise context

Requirements and sequence described by the evidence

Prerequisites

  • Docker and Docker Compose installed on the host.README.md:63-64
  • Python 3.x and the pycryptodome library installed on the host to run exploit scripts.README.md:65-69
  • The host must expose port 8080 to localhost for accessing the vulnerable nginx-ui instance.nginx_lab/docker-compose.yml:5-6
  • The host's Docker socket (/var/run/docker.sock) must be mounted into the container, granting the container control over the host's Docker daemon.nginx_lab/docker-compose.yml:8-9

Evidence-described exercise path

  1. Build and start the vulnerable nginx-ui v2.3.7 container using Docker Compose.README.md:73-76
  2. Verify the container is running by sending a request to the /api/install endpoint.README.md:78-81
  3. Reproduce CVE-2026-42221 by running the exploit_42221.py script, which registers an attacker admin account.README.md:83-88
  4. Optionally, start the patched v2.3.8 environment and verify that the attack fails.README.md:90-108
  5. Tear down the environments using docker compose down -v.README.md:110-118
Safety-review evidence

Behaviors behind the stored safety assessment

Suspicious behavior

The Docker Compose file mounts the host's Docker socket (/var/run/docker.sock) into the container. This grants the container full control over the host's Docker daemon, which is a well-known container escape vector. While the README does not explicitly describe using this socket for host compromise, the combination of a vulnerable web application (allowing unauthenticated command execution per CVE-2026-42238) and Docker socket access creates a concrete path for an attacker to escape the container and control the host. This capability is not required for the stated vulnerability demonstration (which targets the nginx-ui application itself) and represents a significant, unnecessary risk to the host.

nginx_lab/docker-compose.yml:8-9README.md:27-28

Indicators requiring review

  • The Docker socket (/var/run/docker.sock) is mounted into the container, providing the container with the ability to control the host's Docker daemon. This is a common container escape technique and is not necessary for demonstrating the stated CVEs, which target the nginx-ui web application.nginx_lab/docker-compose.yml:8-9
Review boundaries

What the analysis did not establish

  • The exploit scripts (exploit_42221.py, encrypt_password.py, test_patched.py) are not included in the evidence packet, so their exact behavior cannot be analyzed.
  • The patched environment (nginx_lab_patched/) is referenced but not included in the evidence packet.
  • The base image uozi/nginx-ui:v2.3.7 is not inspected; its internal behavior is unknown.
  • The repository README references an external Qiita article and a GitHub repository, but their content is not included.
Model interpretation

This review is limited to the supplied lab evidence packet. It does not assert that the environment runs, reproduces a vulnerability, or is safe to execute. Contract: eip-docker-lab-analysis-v1.

GitHub

nginx_lab_patched/docker-compose.yml

fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-Created
Vuln labCVE-2026-42221CVE-2026-42238Compose · builds

1 Compose manifest · 1 Dockerfile · 1 service

Analysisdeepseek-v4-pro:cloud ·

Environment assessment

A Docker Compose environment for a patched version (v2.3.8) of nginx-ui, a web GUI for Nginx. It is part of a larger repository designed to verify CVE-2026-42221 and CVE-2026-42238. The service mounts the Docker socket and exposes port 9000 on localhost:8081.

nginx_lab_patched/docker-compose.yml:1-12README.md:1-3

Lab assessment

Vulnerability lab

The README explicitly states the repository is for verifying CVE-2026-42221 and CVE-2026-42238 in a Docker environment. This unit represents the patched version (v2.3.8) used to confirm the fixes.

README.md:1-3
Lab shapeCompose · builds
Services1
Compose manifests1
Dockerfiles1
Evidence & reasoningComponents · CVE assessment · exercise context · review boundaries
Components

Services and files described by the evidence

nginx-ui

vulnerable target (patched)web application

A service built from uozi/nginx-ui:v2.3.8 with custom configuration files and an entrypoint script. It runs the nginx-ui web interface on port 9000, mapped to host port 8081. It mounts the Docker socket and a named volume for its data directory.

nginx_lab_patched/docker-compose.yml:2-9nginx_lab_patched/Dockerfile:1-16
CVE assessment

How the supplied evidence relates each vulnerability

CVE-2026-42221

Insufficient evidence

The unit is the patched version (v2.3.8) intended to demonstrate that the vulnerability is fixed. The supplied evidence does not include the exploit script or any runtime behavior showing the vulnerability is present or absent in this specific unit.

README.md:1-3README.md:25-27

CVE-2026-42238

Insufficient evidence

The unit is the patched version (v2.3.8) intended to demonstrate that the vulnerability is fixed. The supplied evidence does not include the exploit script or any runtime behavior showing the vulnerability is present or absent in this specific unit.

README.md:1-3README.md:25-27
Exercise context

Requirements and sequence described by the evidence

Prerequisites

  • Docker and Docker Compose installed on the host.README.md:67-68
  • The host must have the nginx_lab_patched directory as the build context.nginx_lab_patched/docker-compose.yml:3

Evidence-described exercise path

  1. Navigate to the nginx_lab_patched directory and build the Docker image.README.md:93-95
  2. Start the container in detached mode.README.md:95
  3. Retrieve the installation secret from the running container using docker exec.README.md:99-101
  4. Access the setup screen at http://localhost:8081 and use the secret to register an admin user.README.md:103
  5. Run the test script from the scripts directory to confirm the patch blocks the exploit.README.md:107-109
Safety-review evidence

Behaviors behind the stored safety assessment

No harmful behavior observed

The unit is a documented patched target for a vulnerability lab. It mounts the Docker socket, which is a high-risk configuration, but this is a known prerequisite for nginx-ui's functionality and is disclosed in the lab setup. No unexpected harmful behavior, such as host compromise, data destruction, or external communication, is evidenced in the supplied files.

nginx_lab_patched/docker-compose.yml:8README.md:1-3
Review boundaries

What the analysis did not establish

  • The exploit scripts (exploit_42221.py, test_patched.py) are not included in the evidence packet, so their behavior cannot be assessed.
  • The unit is part of a larger repository; the relationship with the vulnerable unit (nginx_lab) is described but its files are not supplied.
  • The Docker socket mount is a significant security risk if the container is compromised, but no compromise is evidenced here.
Model interpretation

This review is limited to the supplied lab evidence packet. It does not assert that the environment runs, reproduces a vulnerability, or is safe to execute. Contract: eip-docker-lab-analysis-v1.

References

4