Shy2593666979 AgentChat Insecure Direct Object Reference Vulnerability in User Endpoint
Vulnerability
A vulnerability allowing Insecure Direct Object Reference (IDOR) has been identified in Shy2593666979 AgentChat versions through 2.3.0. This vulnerability exists in the User Endpoint, specifically within the 'get_user_info' and 'update_user_info' functions of the file '/src/backend/agentchat/api/v1/user.py'. The issue arises because the 'user_id' parameter is accepted directly from user input without proper authorization checks, allowing unauthenticated attackers to access or modify sensitive user information remotely.
Impact
Exploitation of this vulnerability leads to unauthorized access and modification of user information, including sensitive data such as avatars and descriptions.
Reproduction
To reproduce this vulnerability, send a request to the '/api/v1/user/info' or '/api/v1/user/update' endpoint with a manipulated 'user_id' parameter. The absence of authorization checks will allow access to or modification of the specified user's information. This can be done by logging in as a guest user and then querying or updating the information of an admin user by simply changing the 'user_id' parameter to that of the admin.
Remediation
Implement proper authorization checks to ensure users can only access or modify their own information. Consider retrieving the user ID from the authenticated session or token instead of accepting it as a parameter. Applying role-based access control (RBAC) to restrict access to user data and logging all user information access and modification attempts for security auditing are also recommended.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
