Summary
FastBee's ProductController may let an authenticated tenant user access product records belonging to other tenants by providing their product IDs. Depending on the operation exposed, this could reveal sensitive MQTT credentials, change product configuration, or delete products and related records.
Affected context
The issue affects FastBee through version 2.1.0 in product operations handled by ProductController. It becomes risky when a request accepts a product ID but does not adequately verify that the requested product belongs to the authenticated user's tenant.
Exploit preconditions
- Attack surface: ProductController operations that accept a product ID
- Required access: An authenticated tenant account
- Trigger point: A request referencing a product outside the user's tenant
- Why exploitation is possible: The product identifier may be used to select a record without enforcing tenant ownership for the requested action
- Enumeration factor: Sequential or otherwise guessable IDs may make other product records easier to discover
Why this happens
The underlying issue is an authorization check that may rely on a user-supplied object identifier without confirming the object's tenant scope. This is an insecure direct object reference and maps to CWE-639: Authorization Bypass Through User-Controlled Key. Authentication alone does not establish permission to access or alter every record identified by a valid product ID.
Potential impact
- Authenticated users may read other tenants' MQTT account, password, or secret values.
- Users could overwrite product configuration, potentially including the tenant association.
- Product records and associated rows could be deleted without authorization.
- Cross-tenant access could undermine confidentiality and data integrity.
General mitigation guidance
Defensive approaches commonly bind every object lookup and operation to the authenticated tenant's authorization scope.
- Enforce object-level authorization on reads, updates, and deletes, not only at the API or route level.
- Derive tenant identity from trusted authentication context rather than accepting it from request data.
- Use tenant-scoped queries and deny access by default when ownership cannot be verified.
- Minimize exposure of secrets and apply least privilege to application and database operations.
- Treat identifiers as untrusted input; making them hard to guess should complement, not replace, authorization checks.
How teams detect issues like this
- Review controller and service code for product lookups keyed only by a client-supplied ID.
- Check that tenant ownership is enforced consistently on read, update, and delete paths.
- Use static analysis or code-review rules to flag object access without an associated authorization check.
- Add policy and integration tests that attempt cross-tenant access for each product operation.
- Monitor for repeated requests involving many product IDs or actions against records outside the caller's tenant.

