Summary
Bootimus suffers from broken access control in its JWT middleware, allowing low-privileged authenticated users to invoke administrative endpoints without proper role checks.
By abusing missing enforcement of the is_admin flag on /api/users routes, attackers can create or reset administrator accounts and ultimately gain full control over the PXE boot server.
Affected context
This vulnerability appears in Bootimus deployments that rely on JWT-based authentication for API access but do not enforce role-based authorization in middleware or handlers.
It specifically affects requests to endpoints under the /api/users path where the middleware validates token integrity and account status, yet omits checks on the is_admin flag or equivalent role attribute.
Environments that expose these APIs to authenticated users, including service accounts or operators with non-admin roles, are at risk if authorization rules are not consistently applied.
Exploit preconditions
- Attack surface: Bootimus HTTP API, particularly endpoints under
/api/users. - Required access: Valid, low-privileged authenticated user account or JWT token.
- Trigger point: Sending crafted requests to user-management endpoints (e.g., create, update, reset) that lack role enforcement in
JWTMiddleware. - Why exploitation is possible: The middleware verifies token validity and basic account status but does not inspect or enforce the
is_adminflag, allowing any authenticated user to perform administrative actions when calling these routes.
Why this happens
The underlying issue is a failure to implement proper authorization checks after authentication, corresponding to CWE-862: Missing Authorization.
In the affected code, JWTMiddleware ensures that the JWT is valid and that the associated account is active, but omits any logic to confirm that the caller has an administrative role before granting access to sensitive /api/users operations.
This design implicitly assumes that authenticated access is sufficient, conflating authentication with authorization and leaving critical administrative functions unprotected by role-based controls.
Potential impact
- Attackers may create new administrator accounts and assign themselves elevated privileges.
- Attackers could reset passwords for existing administrator accounts, locking out legitimate admins.
- An attacker can gain full control over Bootimus server configuration and management features.
- Boot menus and installation scripts served to PXE clients could be modified or poisoned.
- Compromised PXE deployments may lead to widespread unauthorized OS installs or backdoored systems.
General mitigation guidance
Effective mitigation focuses on consistently enforcing authorization separate from authentication, especially around administrative APIs.
Common defensive patterns include:
- Implementing explicit role and permission checks in middleware or handlers for all privileged endpoints, using attributes like
is_admin. - Centralizing authorization logic so that all routes serving administrative functions depend on a shared, reviewed access-control mechanism.
- Designing APIs with least privilege in mind, exposing only necessary operations to non-admin roles and segregating sensitive admin endpoints.
- Applying defense-in-depth by auditing route definitions, ensuring that user-management and configuration-changing operations always require strong administrative claims.
How teams detect issues like this
Detection typically involves both code-level and runtime checks:
- Static analysis or manual review to identify handlers that validate authentication but lack role or permission enforcement, especially for
/api/usersor other administrative paths. - Searching for middleware functions (such as
JWTMiddleware) that verify token integrity without checking role flags likeis_adminor equivalent claims. - Implementing API access logs and anomaly detection to flag low-privileged accounts performing administrative-style operations.
- Using automated policy enforcement tools or linters that require explicit authorization checks on routes tagged as admin or user-management endpoints.

