{
  "id": "CVE-2026-42221",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-42221",
  "published_at": "2026-05-04T20:09:37.308Z",
  "title": "nginx-ui: Unauthenticated First-Run Installer Allows Remote Initial Admin Claim",
  "vendor": "0xJacky",
  "product": "nginx-ui",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-06-23T06:59:10Z",
    "first_seen_at": "2026-11-14T14:50:35.824Z",
    "days_after_publication": 49.5,
    "repo": "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 1,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-306",
  "cpes": [
    "cpe:2.3:a:nginxui:nginx_ui:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.1,
    "nvd": 9.8
  },
  "repos": [
    {
      "repo": "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-",
      "url": "https://github.com/fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-",
      "created_at": "2026-06-23T06:59:10Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2026-06-15T13:24:39Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "0xJacky",
        "product": "nginx-ui",
        "ranges": [
          "\u003e= 2.0.0, \u003c 2.3.8"
        ],
        "fixed_in": [
          "2.3.8"
        ]
      }
    ],
    "upgrade": [
      "Upgrade nginx-ui to 2.3.8 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-h27v-ph7w-m9fp"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/0xJacky/nginx-ui/releases/tag/v2.3.8"
      }
    ]
  },
  "exploit_refs": [
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-42221.yaml",
      "source": "nuclei",
      "title": "nuclei template: Nginx UI \u003c= 2.3.7 - Unauthenticated Installer Exposure",
      "published_at": "2026-09-01T16:27:11Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "GET",
      "path_template": "/api/crypto/public_key",
      "ports": [
        8080,
        8081
      ],
      "protocol": "http",
      "repos": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/encrypt_password.py:12"
      ]
    },
    {
      "method": "GET",
      "path_template": "/api/install",
      "ports": [
        8080,
        8081
      ],
      "protocol": "http",
      "repos": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/README.md:84",
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/exploit_42221.py:31",
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:8"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/crypto/public_key",
      "content_type": "application/json",
      "ports": [
        8080,
        8081
      ],
      "protocol": "http",
      "repos": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:14"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/install",
      "content_type": "application/json",
      "ports": [
        8080,
        8081
      ],
      "protocol": "http",
      "repos": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:37"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/restore",
      "content_type": "application/json",
      "ports": [
        8080,
        8081
      ],
      "protocol": "http",
      "repos": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "fuchiuebusi-lab/nginx-ui-CVE-2026-42221-CVE-2026-42238-/scripts/test_patched.py:57"
      ]
    }
  ],
  "rules": []
}
