Nginx UiWeb server / proxy · Nginxui

CVE-2026-42238

CRITICAL · 9.8 CVSS v3.1 Published 2026-05-04
Fix available
A fix is available. Upgrade to 2.3.8 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Nginx UI is a web user interface for the Nginx web server. Prior to version 2.3.8, nginx-ui exposes a backup restore endpoint (POST /api/restore) that is completely unauthenticated during the first 10 minutes after process startup on any fresh installation. An unauthenticated remote attacker can upload a crafted backup archive that overwrites the application's configuration file (app.ini) and SQLite database. Because the attacker controls the restored app.ini, they can inject an arbitrary OS command into the TestConfigCmd setting. After the application automatically restarts to apply the restored config, a single follow-up request triggers that command as the user running nginx-ui — typically root in Docker deployments. This issue has been patched in version 2.3.8.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Nginx UI versions before 2.3.8 contain an unauthenticated backup restore endpoint (POST /api/restore) that is accessible during the first 10 minutes after startup on fresh installations. Attackers can upload a crafted backup archive to overwrite app.ini and the SQLite database, injecting arbitrary OS commands into the TestConfigCmd setting. After the application automatically restarts with the malicious config, a follow-up request executes the injected command as the nginx-ui user (typically root in Docker).

MitigationUpgrade to version 2.3.8 or later immediately. If upgrading is not possible, ensure the service is not network-exposed during the initial 10-minute post-startup window and monitor for unauthorized access.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Nginx UiWeb server / proxy
Affected:< 2.3.8

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify Nginx UI installation and version
    Locate the Nginx UI binary or Docker container, then run 'nginx-ui --version' or inspect the container image tag. Alternatively, check the application UI footer or /api/version endpoint for the running version.
    Affected if The installed version is any version prior to 2.3.8 (e.g., 2.3.7, 2.3.6, 2.0.x, etc.)
  2. Determine if this is a fresh installation within 10 minutes
    Check the application startup timestamp. On fresh installs, the /api/restore endpoint is only exposed for the first 10 minutes after initial startup. Review container/process start time or system logs for the first startup event.
    Affected if The application was started within the last 10 minutes on a fresh installation and the version is below 2.3.8
  3. Inspect app.ini for TestConfigCmd modification
    Locate the app.ini configuration file (typically in /etc/nginx-ui/app.ini, the data volume, or beside the binary). Open it and search for a TestConfigCmd setting under any section. Check for suspicious or unexpected command values.
    Affected if The app.ini file contains a TestConfigCmd setting with an unexpected command, reverse shell, or suspicious execution payload
  4. Verify network exposure of /api/restore endpoint
    From an external host or another container, attempt a curl POST to http://TARGET:PORT/api/restore (or https). Use: curl -X POST http://your-nginx-ui-ip:PORT/api/restore -v to check if the endpoint responds (it should return 401/403 or a restore form if secured, or accept the request if vulnerable).
    Affected if The /api/restore endpoint accepts requests without authentication and returns a restore form or upload prompt, indicating it is exposed
  5. Check SQLite database for tampering
    Locate the SQLite database file (typically nginx-ui.db in the data directory). Use 'sqlite3 nginx-ui.db .schema' to inspect tables, and look for any modifications to configuration tables that might indicate a restored malicious backup.
    Affected if The database contains unexpected configuration entries or shows signs of recent restoration from an untrusted source

You are affected if Nginx UI version is below 2.3.8 AND the application is a fresh installation started within the last 10 minutes OR if the app.ini contains a suspicious TestConfigCmd setting with arbitrary commands.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 2.3.8 or later
Fixed in 2.3.8
Interim mitigation

Upgrade to version 2.3.8 or later immediately. If upgrading is not possible, ensure the service is not network-exposed during the initial 10-minute post-startup window and monitor for unauthorized access.

Recommended fix High confidence

Nginx UI version 2.3.8

  1. Upgrade Nginx UI to version 2.3.8 or later by following your deployment method (Docker pull, binary download, or package manager update)
  2. After upgrading, verify the /api/restore endpoint now requires authentication before use
  3. Confirm the application starts successfully with the new version
  4. If running in Docker, ensure you pull the latest image tag (e.g., 'latest' or specific 2.3.8 tag) and recreate the container
Caveat Review the release notes for 2.3.8 to check for any configuration or feature changes that may affect your deployment

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Nginx Ui Scoped from the published advisory
  • Consultation3.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA2.0 h
10.0 hours of engineering $1,770
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,832.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-42238 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-42238 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data