# GHSA-MFJ4-8RF3-RPQ6: Unauthenticated dependency inventory + version disclosure via /api/licenses

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-11-12
- Modified: 2026-11-12

## Affected versions

- github.com/0xJacky/Nginx-UI (Go): fixed in 2.9.1

## Description

### Summary

**Privilege required:** **none - unauthenticated.**

`GET /api/licenses`, `/api/licenses/backend`, `/api/licenses/frontend`, and `/api/licenses/stats` return the full Go-module dependency list and component/version inventory of the running nginx-ui **with no authentication**. The `/licenses` group is attached to the bare `/api` root group, which carries only `IPWhiteList()` - and that is fail-open when the allowlist is empty (the default).

### Details

- `license.InitRouter(root)` (`router/routers.go:76`) registers the `/licenses` routes on the bare `root := r.Group("/api", middleware.IPWhiteList())` (`router/routers.go:71`) - **not** inside any `AuthRequired` group (those are created later, at `:91` onward).
- `IPWhiteList()` (`internal/middleware/ip_whitelist.go`) returns `c.Next()` when `settings.AuthSettings.IPWhiteList` is empty (default), so it is not an authentication barrier.
- `GetBackendLicenses()`/`GetLicenses()` (`api/license/license.go`) return the complete module dependency graph with versions and component metadata.

### Proof of concept

```
curl -s http://<nginx-ui-host>/api/licenses/backend     # no auth, no cookie, no token
```
Returns the full backend dependency list with versions.

### Impact

Pre-auth reconnaissance: an unauthenticated attacker enumerates the exact Go dependency versions and components, pinpointing which known-vulnerable library versions the target ships - a direct aid to picking an n-day. No secrets are exposed, so this is Medium at most, but it is genuinely unauthenticated and exposed on the default config.

## Remediation

Move the `/licenses` routes behind `AuthRequired()`, or reduce the response to a static license-text bundle without live version/dependency data.

### Patches

Fixed in 2.9.1: the `/api/licenses*` routes moved from the public `/api` group into the authenticated router group ([7e8eb84817](https://github.com/0xJacky/nginx-ui/commit/7e8eb84817)).

### Workarounds

Configure the IP allowlist, or block `/api/licenses` at the reverse proxy until you can upgrade.

## References

- https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-mfj4-8rf3-rpq6

Page: https://cve.now/GHSA-MFJ4-8RF3-RPQ6

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
