Summary
Snipe-IT's maintenance update API incorrectly trusts attacker-controlled asset identifiers after an initial authorization check.
Under certain conditions, an authenticated user can reassign a maintenance record to an asset they are not authorized to access, enabling cross-tenant data tampering and exposure.
Affected context
The vulnerability occurs in Snipe-IT deployments that expose the /api/v1/maintenances/{maintenance_id} endpoint for PATCH or PUT updates.
It manifests when authorization is enforced only on the original maintenance record and asset, but not re-evaluated after client-supplied fields (notably asset_id) are changed.
This is most relevant in multi-company or multi-tenant environments where asset access is scoped by company or ownership rules rather than globally shared.
Exploit preconditions
- Attack surface: Authenticated HTTP API, specifically
PATCH/PUT /api/v1/maintenances/{maintenance_id} - Required access: Valid user account with permission to modify a maintenance record on at least one asset
- Trigger point: Sending an update request that includes a different
asset_idin the JSON or form payload - Why exploitation is possible: The system checks authorization against the original asset and maintenance record but does not re-authorize the newly supplied asset, allowing reassignment of a maintenance record to an out-of-scope asset.
Why this happens
This bug reflects CWE-639: Authorization Bypass Through Parameter Manipulation.
The application correctly performs an initial access control check on the existing maintenance record and associated asset but then trusts client-controlled identifiers during updates.
By allowing a user to change asset_id without re-running authorization logic against the new target, the system decouples privilege checks from the effective resource being modified.
Conceptually, it is an insecure pattern where resource identifiers in request parameters or bodies are assumed to remain within the caller's authorized scope and are not independently validated.
Potential impact
- Users may move maintenance records onto assets belonging to a different company or tenant.
- Data integrity for maintenance history and asset relationships could be compromised.
- Sensitive asset details or operational metadata may become exposed to unauthorized users through linked views.
- Audit trails and compliance records can be corrupted by cross-scope reassignment of maintenance entries.
- Misattribution of maintenance activities may impact incident response or asset lifecycle decisions.
General mitigation guidance
Effective mitigation centers on re-binding authorization to the actual resource being modified, not just the original one.
Recommended patterns include:
- Enforcing authorization checks on all resource identifiers supplied in update requests, especially when they can change associations (e.g.,
asset_id). - Treating client-supplied IDs as untrusted and verifying that the requesting user has access to the referenced asset in the current company or tenant scope.
- Normalizing update flows so that changing ownership or association to a different asset uses dedicated, strongly authorized operations instead of generic update endpoints.
- Implementing server-side constraints to prevent cross-company resource reassignments unless explicitly permitted by business rules.
- Applying least-privilege design to roles so that maintenance modification permissions cannot implicitly grant cross-scope reassignment capabilities.
How teams detect issues like this
Organizations can identify this class of issue through:
- Static analysis or custom linting rules that flag update handlers using request parameters (e.g.,
asset_id) without an accompanying authorization check tied to the new resource. - Code review practices that focus on multi-step workflows where authorization is only performed at the beginning of a request and not after mutable identifiers are processed.
- Defensive security tests that attempt to reassign records (maintenance, tickets, orders) to resources owned by other tenants or companies by manipulating IDs.
- Policy enforcement that requires each API endpoint to explicitly verify access to any resource referenced in request bodies or query/path parameters, especially in multi-tenant systems.
- Use of automated security testing tools that can model tenant boundaries and try cross-tenant ID substitution attacks against API endpoints.

