/

CVE-2026-42222

Severity:

HIGH RISK

(8.1)

Broken / Missing Authentication on Critical Functionality

CVE-2026-42222

Analyzed

Vulnerability type

Category:

Broken / Missing Authentication on Critical Functionality

CWE:

CWE-284, CWE-306

Impact:

Administrative Account Takeover and Configuration Control

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Nginx UI 2.3.5 exposes an unauthenticated installation endpoint (POST /api/install) that allows an attacker to hijack the initial setup process.

During the installation window, a remote party can complete bootstrap steps without authentication, potentially gaining administrative control of the UI and its managed Nginx configuration.

Affected context

This vulnerability occurs in Nginx UI deployments that are:

  • Running version 2.3.5
  • Exposing the web interface (and thus /api/install) over a network that is reachable by untrusted users
  • In their initial installation or reinstallation phase, before an admin account and normal authentication flow are fully established

In this window, the installation API is available without strong access controls, enabling unintended parties to drive the bootstrap process.

Exploit preconditions

  • Attack surface: HTTP(S) interface of Nginx UI (/api/install endpoint)
  • Required access: Network reachability to the Nginx UI instance during its installation window; no prior authentication required
  • Trigger point: Issuing a crafted POST request to /api/install while the application is not yet fully configured
  • Why exploitation is possible: The bootstrap/installation workflow does not enforce authentication or sufficient access control, allowing arbitrary clients to perform privileged initialization operations

Why this happens

The core issue is that a critical initialization function—responsible for setting up the application and likely defining administrative credentials or core configuration—is exposed without authentication.

This maps to CWE-306: Missing Authentication for Critical Function, as the install endpoint performs high-privilege actions but does not require a proven identity.

It is closely related to CWE-284: Improper Access Control, since the system does not constrain who can invoke installation logic once the service is reachable, treating all callers as implicitly trusted during bootstrap.

Potential impact

  • An attacker may complete the installation and create or control the first administrative account.
  • An attacker could configure or modify Nginx UI settings and managed Nginx server configuration.
  • The UI and underlying web server could be misconfigured for traffic interception, redirection, or further compromise.
  • Operational outages could be caused by malicious or erroneous configuration changes.
  • Subsequent legitimate administrators may be locked out or unknowingly operate a compromised management interface.

General mitigation guidance

Mitigations typically focus on reducing exposure of installation workflows and enforcing authentication or strict trust boundaries around bootstrap operations:

  • Restrict network access to the Nginx UI installation endpoint to trusted administrative hosts or private management networks only.
  • Place the UI behind an external authentication or access control layer (e.g., reverse proxy with strong authentication) during installation.
  • Use host-level firewall rules, VPNs, or SSH tunnels so that /api/install is not reachable from the public internet.
  • Treat installation mode as a high-risk state and minimize its duration, completing setup promptly and disabling or locking the install path afterward.
  • Apply least privilege to the runtime environment so that even if an attacker completes installation, their ability to impact the broader system is constrained.

How teams detect issues like this

Detection can focus on both preventative and forensic dimensions:

  • Review the codebase and routes to identify unauthenticated endpoints that perform privileged actions, especially those gated only by "installation mode" flags.
  • Use static analysis or custom linting rules to flag critical operations (account creation, privilege configuration, system-wide settings changes) that lack explicit authentication/authorization checks.
  • Instrument application logging around /api/install to capture timestamps, source IPs, and parameters, then alert on installation events from unexpected networks or at unusual times.
  • Employ web application firewalls or API gateways to monitor and optionally block direct access to installation endpoints.
  • During security reviews, explicitly test installation and reset flows as separate threat surfaces, confirming they require strong authentication or are network-isolated.

Sources

SourceLink
github.comgithub.com/0xJacky/nginx-ui/security/advisories/GHSA-mxqh-q9h6-v8pq

Frequently asked

questions

Yes. If the Nginx UI instance in version 2.3.5 is reachable over the network during its installation window, a remote attacker can exploit the unauthenticated /api/install endpoint without local access.

No. The issue arises specifically because the installation endpoint does not enforce authentication, allowing a client with only network reachability to perform privileged bootstrap actions.

The safest pattern is to require strong authentication for all critical functions, including installation and bootstrap flows, and to ensure these workflows cannot be invoked by arbitrary unauthenticated users once the service is exposed.

During design, treat installation, reset, and recovery endpoints as high-privilege APIs that must either be fully authenticated, tightly network-restricted, or both. Incorporate explicit access control checks around all administrative routes, perform threat modeling for bootstrap stages, and use automated checks in CI to flag critical operations that lack authentication.

Find out what's already
exploitable in your codebase.