Summary
Open5GS WebUI has an authorization flaw that can let an authenticated account with a user role modify account records through the database API. If the endpoint does not enforce role and field-level permissions, an attacker may change roles, alter password hashes, delete accounts, or read hashes, potentially gaining administrative control.
Affected context
The issue is in the Open5GS WebUI database route for the Account model. It becomes a risk when an authenticated user-role account can reach the account update endpoint and the application does not adequately restrict which accounts or fields that role may modify. The described operations include changing roles, overwriting password hashes, deleting accounts, and reading hashes.
Exploit preconditions
- Attack surface: The WebUI database API, specifically the Account resource endpoint
- Required access: An authenticated account with a user role
- Trigger point: A request to update an Account record
- Why exploitation is possible: Authorization and field-level controls do not sufficiently prevent the user role from performing privileged account operations
Why this happens
The route permits account-management actions without correctly checking whether the authenticated principal is authorized to perform them. This is an authorization enforcement failure mapped to CWE-862: Missing Authorization. Insecure patterns can include relying only on authentication, accepting broadly writable model fields, or failing to apply role and object-level checks to sensitive operations.
Potential impact
- A user-role account could gain administrative privileges
- Account credentials or password hashes could be exposed or altered
- Accounts could be deleted or made inaccessible
- Administrative control of the WebUI could be compromised
General mitigation guidance
Mitigation generally centers on enforcing authorization at every sensitive operation and limiting account mutations to explicitly permitted actions.
- Apply server-side role and object-level authorization checks to account reads, updates, and deletions
- Use field allowlists so user-role requests cannot modify privileged attributes such as roles or password hashes
- Avoid returning password hashes or other credential material through API responses
- Separate administrative account-management functions from ordinary user workflows
- Use least-privilege roles and deny access by default when authorization is uncertain
How teams detect issues like this
Review account API routes for authorization checks that are performed before database reads or writes, and verify that checks cover both the target account and each mutable field. Static analysis and code review can flag broad model updates, mass assignment, sensitive fields in API responses, or routes that rely on authentication without role checks. Runtime policies and tests can verify that user-role accounts cannot perform administrative account operations.

