Summary
Nginx UI from version 2.4.1 up to (but not including) 2.9.2 contains a flaw in configuration validation (internal/config/validation.go). The directive denylist can be bypassed by placing a blocked directive after a token containing '#;'. This is an interpretation conflict (CWE-436): the validator and nginx parse the same content differently.
The attack is network-based, low in complexity and requires no user interaction, but it needs high privileges, i.e. an authenticated user with configuration write access. Crafted content can be submitted through the config API, site and stream saves, or MCP tools.
An attacker can load njs or perl modules and gain code execution in the nginx worker process, with full impact on confidentiality, integrity and availability (CVSS 7.2, high severity). The vulnerability is not listed in the CISA KEV catalog.
Who is affected
Organizations using Nginx UI versions 2.4.1 up to (but not including) 2.9.2 to manage nginx servers.
What to do
- Upgrade Nginx UI to version 2.9.2 or later.
- Check which Nginx UI version you run and whether instances are reachable from the network.
- Restrict configuration write access, as well as API and MCP tool access, to necessary and trusted users only.
- Review existing nginx configurations for unexpected module-loading directives (njs, perl) and tokens containing '#;'.
- See the vendor advisory GHSA-xwxf-xc5j-p7hx for details.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Administrator
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
- CWE-436 Interpretation Conflict
References
- github.com/0xJacky/nginx-ui/security/advisories/GHSA-xwxf-xc5j-p7hx vendor advisory
- github.com/0xJacky/nginx-ui/commit/d1359aa73a560153d9e022136d66f557bed1d1e6 patch
- github.com/0xJacky/nginx-ui/releases/tag/v2.9.2
- github.com/0xJacky/nginx-ui/blob/v2.9.1/internal/config/validation.go#L383-L394
- github.com/0xJacky/nginx-ui/blob/v2.9.1/internal/config/validation.go#L447-L453
- www.vulncheck.com/advisories/nginx-ui-2.4.1-before-2.9.2-config-directive-denylist-bypass-
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.