Summary
Snipe-IT REST API endpoints can persist user records before verifying that submitted company assignments are within the actor's authorized scope. In deployments using Full Multiple Companies Support, an eligible non-superuser may create or edit accounts so they cross company or tenant boundaries.
Affected context
The issue occurs in Snipe-IT installations using Full Multiple Companies Support when the user creation or update API accepts company identifiers. It is relevant where authorization filtering is performed after the user record has already been saved, particularly when floating users are allowed through the null_company_is_floater setting.
Exploit preconditions
- Attack surface: Snipe-IT REST API user creation and update endpoints
- Required access: An authenticated non-superuser with users.create, or users.edit access to a target user
- Trigger point: Submission of user data containing company assignment identifiers
- Required deployment condition: Full Multiple Companies Support is enabled and the actor's company scope does not include every submitted identifier
- Why exploitation is possible: The user record may be committed before company assignments are checked against the actor's permitted companies
Why this happens
The underlying bug is an authorization-ordering failure. The API fills and persists a user record from request data before enforcing the actor's company-level authorization on company_id or company_ids values. This post-persistence validation allows unauthorized relationship changes or leaves an account without an effective company restriction when floating users are enabled. The behavior maps to CWE-863, which covers incorrect authorization checks that permit access or actions outside an actor's intended permissions.
Potential impact
- An attacker may create accounts associated with companies outside their authorized scope
- An attacker could relocate existing users across company or tenant boundaries
- Accounts may gain cross-company visibility or access to records
- A user could be persisted as an unintended floating account
- Administrative separation between companies could be weakened
General mitigation guidance
Mitigation generally focuses on enforcing authorization before any database
mutation and treating company identifiers as untrusted input.
Common defensive patterns include:
- Authorizing every requested company assignment against the actor's permitted scope before filling or saving the user record
- Rejecting mixed permitted and foreign company identifiers rather than partially filtering them
- Performing authorization and persistence within an atomic transaction
- Applying consistent server-side authorization to both create and update paths
- Disabling or tightly governing floating-user behavior where it is not required
- Using least-privilege roles and narrowly scoped company permissions
- Returning validation errors without committing partial user or relationship state
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks for persistence occurring before authorization
- Review of controller paths that mass-assign relationship identifiers from request data
- Tests that submit permitted, foreign, and mixed company identifiers under restricted accounts
- Integration tests confirming failed authorization leaves no user or pivot-row changes
- Audit-log searches for user creation, relocation, or floating-account events initiated by non-superusers
- Policy enforcement requiring authorization checks before database writes in API handlers
Neutral automated code-review tools may help identify save operations that precede policy or scope validation.

