CVE-2026-84317: Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)

Published Oct 12, 2026
·
Updated

Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, internal/config/validation.go (ValidateConfigFile) is a security control that blocks dangerous nginx directives — js, perl, loadmodule of the njs/perl modules, and user root. It is enforced on three of the four config-write paths: api/config/add.go, api/config/modify.go, and mcp/config/configmodify.go. The fourth path — the MCP tool nginxconfigadd (mcp/config/configadd.go) — does NOT call it: it writes the caller-supplied content straight to disk and reloads nginx. An authenticated MCP caller (or an MCP agent induced via prompt injection) can therefore inject exactly the directives the control is meant to block, leading to nginx code execution on deployments where the njs/perl module is available (e.g. the official Docker image). This issue is fixed in version 2.4.1.

Affected Software

1 affected component
Nginx UI Nginx UI<2.4.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Nginx UI to a version that resolves this vulnerability.

    Fixed in 2.4.1

Event History

Oct 12, 2026
CVE Published
via MITRE·08:59 PM
Data Sourced
via MITRE·08:59 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most likely to be exposed to code execution?

Deployments that expose the MCP nginx_config_add tool to authenticated callers and have the nginx njs or perl module available are susceptible to nginx code execution. The official Docker image is identified as an example where those modules are available.

2

What access does an attacker need?

An attacker needs authenticated access to the MCP tool, or must be able to induce an MCP agent to invoke it through prompt injection. No user interaction is required once the tool is invoked.

3

Are all configuration-writing interfaces affected?

No. The described validation is enforced by the API config add and modify paths and by the MCP config modify path. The affected path is specifically the MCP nginx_config_add tool, which writes supplied configuration content and reloads nginx without validation.

4

What version fixes the issue?

Upgrade Nginx UI to version 2.4.1, which contains the fix.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203