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.
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 http://localhost:8080, 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
scripts/exploit_42221.pyPython 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
http://localhost:8080The 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
username: attacker, password: attacker_password, email: attacker@evil.comHardcoded 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 scripts/exploit_42221.py.
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.
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.
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.
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.
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.
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.
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
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.
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
Build and start the vulnerable nginx-ui v2.3.7 container using Docker Compose.README.md:73-76
Verify the container is running by sending a request to the /api/install endpoint.README.md:78-81
Reproduce CVE-2026-42221 by running the exploit_42221.py script, which registers an attacker admin account.README.md:83-88
Optionally, start the patched v2.3.8 environment and verify that the attack fails.README.md:90-108
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.
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.
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.
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.
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.
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
Navigate to the nginx_lab_patched directory and build the Docker image.README.md:93-95
Start the container in detached mode.README.md:95
Retrieve the installation secret from the running container using docker exec.README.md:99-101
Access the setup screen at http://localhost:8081 and use the secret to register an admin user.README.md:103
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.
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.