# GHSA-RG7Q-Q2CR-372Q: Write-scoped service tokens could mutate administrator accounts

- Database: GitHub
- Severity: CVSS 8.8 (High)
- Published: 2026-09-30
- Modified: 2026-09-30

## Affected versions

- github.com/0xJacky/Nginx-UI (Go): from 2.5.3, through 2.6.1

## Description

## Summary

Nginx UI service tokens with `api:write` scope were allowed through the secure-session middleware for API automation. The user-management mutation routes relied on that middleware but did not additionally require an interactive administrator. A holder of a write-scoped service token could therefore create, modify, delete, or recover users and obtain persistent administrator access.

Read-only access to the user list remains available to `api:read` service tokens as an intentional API capability. Only user mutations now require an authenticated interactive administrator and the existing secure-session check.

## Impact

An attacker who obtained a valid `api:write` service token could create or alter an enabled administrator account, converting an automation credential into persistent interactive access. The issue is not reachable with an `api:read` token or without authentication.

## Remediation and compatibility

User-management create, modify, delete, and recover operations now require `RequireInteractiveUser()` in addition to `RequireSecureSession()`. This intentionally removes user-administration support from service-token clients. CLI or automation workflows that previously managed users with a service token must use an interactive administrator session instead. Read-only user listing remains compatible with `api:read` tokens.

Fixed by [cb27607c77e4bcca586181038d7a33281710e5d2](https://github.com/0xJacky/nginx-ui/commit/cb27607c77e4bcca586181038d7a33281710e5d2).

## References

- https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-rg7q-q2cr-372q

Page: https://cve.now/GHSA-RG7Q-Q2CR-372Q

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