Summary
RedAmon has a missing object-level authorization check that can let an authenticated user access agent sessions belonging to other tenants by supplying session IDs. Depending on the route, this may allow the user to list, interact with, or terminate sessions and send commands to shells or Meterpreter sessions on compromised targets.
Affected context
The issue affects RedAmon versions described as 4.0.0 before 7.8.0, in the agent session API. It becomes risky when an authenticated user can reach session routes and the application does not verify that each requested session belongs to that user's tenant before performing the requested action.
Exploit preconditions
- Attack surface: The
/api/agent/sessionslisting, interaction, and kill routes - Required access: An authenticated RedAmon account with access to the API
- Trigger point: A request that supplies a session ID for an operation
- Why exploitation is possible: The application does not adequately enforce tenant ownership for the referenced session
Why this happens
The application appears to rely on a supplied session ID without consistently checking whether the authenticated user is authorized to access the corresponding object. This is a missing object-level authorization pattern associated with CWE-639: Authorization Bypass Through User-Controlled Key. Object identifiers should not be treated as proof of permission.
Potential impact
- An authenticated user may be able to view sessions belonging to other tenants
- A user could interact with or send commands to another tenant's shell or Meterpreter session
- A user may be able to terminate another tenant's agent session
- Activity on affected targets could be disrupted or misused
General mitigation guidance
Mitigation generally centers on enforcing authorization for every object-level operation.
Common defensive patterns include:
- Deriving tenant scope from the authenticated identity rather than trusting client-supplied identifiers
- Checking ownership and permissions for each session before listing, interacting with, or terminating it
- Applying deny-by-default authorization consistently across API routes
- Limiting account and service privileges to the minimum required
- Returning responses that avoid revealing whether another tenant's session exists
How teams detect issues like this
High-level approaches to finding similar issues include:
- Reviewing API handlers for object lookups based on client-supplied IDs without tenant-scoped authorization checks
- Using static analysis or code review rules to flag object access paths that lack authorization enforcement
- Testing authorization policies across users and tenants, including attempts to access objects outside the caller's scope
- Enforcing API security policies that require an authorization check before object reads or state-changing actions
Automated review tools may help identify candidate access paths for manual verification.

