Summary
Roxy-WI contains a broken access control flaw in its monitoring check update endpoint that lets any authenticated user modify checks owned by other tenants.
Because the API only verifies that the caller has some group and not that the target check belongs to that group, attackers can iterate smon_id values and silently rewrite other users' monitoring configurations.
Affected context
The vulnerability appears in multi-tenant or multi-group Roxy-WI deployments where:
- The
/smon/checkendpoint is exposed to authenticated users for updating monitoring checks. - Tenants or teams are logically separated using
user_groupassignments. - Monitoring checks (HTTP, TCP, Ping, DNS) are stored with both an
id/smon_idanduser_groupfield in the database.
In this context, authorization is expected to ensure that users can only modify checks owned by their group, but the update path omits this constraint.
Exploit preconditions
- Attack surface: HTTP PUT requests to the
/smon/checkendpoint. - Required access: Valid authenticated Roxy-WI account in any group.
- Trigger point: Sending an update request that references an
smon_idbelonging to a different user_group. - Why exploitation is possible: The route handler only checks that the caller belongs to some group via
check_user_group_for_flask(), and the downstream SQLUPDATEstatements filter solely onsmon_idwithout auser_groupcondition. This lets a user modify any existing monitoring check by guessing or enumerating identifiers.
Why this happens
The core issue is an authorization design flaw where object-level access is validated incorrectly.
While the application models tenants through user_group, the update functions (update_smon, update_smonHttp, update_smonTcp, update_smonPing, update_smonDns) issue SQL UPDATE ... WHERE smon_id = ? statements without scoping by user_group.
This maps to CWE-639: Authorization Bypass Through User-Controlled Key, because the application trusts the client-supplied smon_id without verifying that it belongs to the requesting user's group.
The presence of a correctly scoped DELETE path (WHERE id = ? AND user_group = ?) highlights an inconsistent application of object-level authorization checks and reflects broader broken access control concerns (CWE-862 and CWE-863).
Potential impact
- Attackers can modify other tenants' HTTP, TCP, Ping, or DNS monitoring checks.
- Monitoring alerts may be disabled, redirected, or configured to ignore real outages.
- Incident visibility can be reduced, delaying detection of genuine service failures.
- Cross-tenant data integrity violations can undermine trust in monitoring results.
- In certain environments, tampered checks could facilitate broader operational or security incidents by masking malicious activity.
General mitigation guidance
Effective mitigation centers on consistent, object-level authorization tied to tenancy or ownership.
Common defensive patterns include:
- Scoping all update and read queries by both the object identifier and the associated
user_groupor owner field. - Using a centralized authorization layer or helper that enforces group/tenant checks for all CRUD operations on shared objects.
- Applying "default deny" for resource access: explicitly verify that the current user is allowed to act on a given
smon_idbefore performing mutations. - Designing database schemas and data-access layers so that ownership constraints are enforced close to the data (for example, repository methods that always take both
idanduser_group). - Minimizing direct reliance on user-supplied identifiers without verifying their association to the current principal.
How teams detect issues like this
Organizations can detect this class of issue through several approaches:
- Static analysis and code scanning: Flag data-access functions that filter only by primary key (
id,smon_id) when a multi-tenant field (user_group,tenant_id,owner_id) is present but unused. - Code review practices: Explicitly review all endpoints handling shared resources to ensure ownership checks are performed before updates, especially when similar operations (like DELETE) already include proper scoping.
- Policy-based tests: Implement unit/integration tests that simulate users from different groups attempting to modify each other's resources, expecting denial.
- Runtime monitoring: Analyze application logs for patterns where one account repeatedly touches
smon_idvalues outside its normal range, or where updates to monitoring objects occur from unexpected tenants.

