All vulnerabilities

Servers and applications

GHSA-8mrc-pvvv-f7p8

Nginx Include Directive Validation Bypass via `glob(3)` vs `filepath.Glob` Character Class Mismatch in `internal/config/includes.go` (`glibcGlobPattern()`)

Severity
Medium 6.6
Published
23 Nov 2026
Last changed
23 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.9.4
Weakness
Improper input validation (CWE-20)Incomplete deny list (CWE-184)
Attack
Over the network · Only under certain conditions · Needs an administrator account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
Sources
Project advisories (GitHub)

Description

The include validator resolved include globs with Go's filepath.Glob, which doesn't understand POSIX bracket expressions. Patterns such as [[:alpha:]], [[:alnum:]], [[.x.]] and [[=x=]] matched no files during validation, while nginx resolves includes with glibc glob(3) and loads the matching files, so restricted directives in them (njs load_module, js_*, user root) were never checked. The include walker used by the other directive checks also skipped glob(3)'s [!...] form. This is an incomplete fix of the [!...] handling added for GHSA-xwxf-xc5j-p7hx. Exploiting it needs an administrator-equivalent credential and a target file that already contains restricted directives. Patterns with a leading ], such as []a-z], are rejected by Go as bad patterns, so validation already failed closed for them.

In internal/config/includes.go, validateConfigIncludes (lines 30-105) resolves include statements using Go's filepath.Glob (nginx.Glob(glibcGlobPattern(pattern))) and treats patterns that…

From 0xJacky/nginx-ui's security advisory. Shortened; the full text is there.

Workarounds

Limit config write access (administrators, api:write tokens, cluster nodes) to trusted principals.

Workarounds as given by 0xJacky/nginx-ui's security advisory.

Affected software

SoftwareAffected versions
Nginx UIServers and applications · github:0xjacky/nginx-ui
  • From 2.9.0 before 2.9.4

About Nginx UI

Yet another WebUI for Nginx

From its GitHub repository.
Docker Hub pulls
1,579,192Docker Hub, 22 Nov 2026
GitHub stars
11,815GitHub, 22 Nov 2026
Forks
924GitHub, 22 Nov 2026
Latest release
v3.0.6GitHub, 22 Nov 2026
Released
19 Nov 2026GitHub
License
AGPL-3.0GitHub
First published on GitHub
19 Feb 2021GitHub

References