Summary
Snipe-IT improperly restricts Laravel Passport OAuth client-management routes, allowing any authenticated user to register clients with attacker-controlled redirect URIs. By persuading an administrator to approve a consent request, an attacker may obtain a bearer token with administrative API permissions and an unusually long lifetime.
Affected context
The vulnerability occurs in Snipe-IT deployments using Laravel Passport OAuth client-management functionality when route authorization does not adequately distinguish ordinary authenticated users from administrators. Risk increases when administrators can be induced to approve unfamiliar OAuth consent requests and issued tokens are permitted to remain valid for extended periods.
Exploit preconditions
- Attack surface: Laravel Passport OAuth client-management and authorization routes
- Required access: An authenticated Snipe-IT account, plus a way to influence or register OAuth client data
- Trigger point: Registration of a client with an attacker-controlled redirect URI followed by administrator approval of the authorization request
- Why exploitation is possible: Authorization checks do not sufficiently restrict client registration, allowing a lower-privileged user to create a client that can receive authorization codes and exchange them for tokens inheriting administrative permissions
Why this happens
The underlying issue is an authorization failure in which authenticated status is treated as sufficient permission to access sensitive OAuth client-management functionality. This maps to CWE-863: Incorrect Authorization, because the application does not enforce the intended privilege boundary before allowing users to create clients and control redirect destinations. The resulting trust in attacker-controlled OAuth metadata can redirect authorization responses and enable unintended privilege acquisition.
Potential impact
- An attacker may obtain bearer tokens with administrative API permissions
- Unauthorized users could access, modify, or delete protected Snipe-IT data
- Long-lived tokens could extend the period of unauthorized access
- Attackers could alter asset, user, or configuration records
- Compromised API access could support persistence or further administrative abuse
General mitigation guidance
Mitigation generally focuses on enforcing least privilege across OAuth management and authorization workflows.
Common defensive patterns include:
- Restricting OAuth client registration and management to explicitly authorized administrators
- Applying server-side authorization checks consistently to every sensitive route and action
- Validating redirect URIs against controlled, pre-registered values rather than accepting arbitrary destinations
- Using narrowly scoped, short-lived access and refresh tokens where operationally possible
- Requiring clear consent context and additional verification for requests involving elevated permissions
- Reviewing and revoking existing clients and tokens whose ownership or redirect destinations are uncertain
- Limiting API permissions according to the requesting principal rather than broadly inheriting administrator privileges
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and route audits that compare OAuth endpoints with their required authorization policies
- Code review checks for authenticated-only middleware on administrative client-management actions
- Tests confirming that ordinary users cannot create or modify OAuth clients or redirect URIs
- Monitoring for newly registered clients, unusual redirect destinations, administrator consent events, and token issuance
- Policy enforcement requiring approved redirect-URI inventories and controlled OAuth scopes
- Automated security review tools that identify authorization gaps and privilege escalation paths

