|
Task Description
Description
The application does not implement adequate Cross-Site Request Forgery (CSRF) protection for the Logs Refresh functionality. As a result, an attacker can craft a malicious HTML page that causes an authenticated victim's browser to send a forged Logs Refresh request.
By replacing the service_id in the forged request with a valid service ID belonging to the victim, the attacker can trigger the Logs Refresh action without the victim's knowledge or consent. Since the request is processed using the victim's authenticated session, the action is executed successfully.
This vulnerability allows attackers to perform unauthorized state-changing actions on behalf of authenticated users.
Steps to Reproduce Log in with an attacker account. Navigate to Services and create a new service. Open a separate browser or private window and log in with a victim account. Create a service in the victim account. Return to the attacker account. Trigger the Logs Refresh functionality for the attacker's service. Capture the request using Burp Suite. Generate a CSRF PoC using Burp Suite → Engagement Tools → Generate CSRF PoC. Save the generated HTML file. Modify the PoC by replacing the attacker's service_id with the victim's service_id. Open the modified HTML file in the victim's browser while the victim is authenticated. Click Submit. Observe that the Logs Refresh action is successfully executed for the victim's service without the victim intentionally initiating the request. Expected Behavior
The application should implement proper CSRF protection for all state-changing requests. Requests should only be accepted when accompanied by a valid anti-CSRF token or another appropriate CSRF mitigation mechanism. Additionally, the server should verify that the request was intentionally initiated by the authenticated user.
Actual Behavior The server accepts forged cross-origin requests without validating their authenticity. As a result, a malicious website can cause an authenticated user's browser to execute the Logs Refresh action using the victim's active session.
Security Impact An attacker can exploit this vulnerability to:
Force authenticated users to perform Logs Refresh operations without their knowledge or consent. Repeatedly trigger Logs Refresh requests on behalf of victims. Consume the victim's available Logs Refresh quota or usage limit. Cause unnecessary resource consumption on the platform. Prevent victims from using the Logs Refresh functionality when it is legitimately needed due to exhausted limits.
Remediation Implement robust CSRF protection for all state-changing endpoints. Require a unique, server-generated anti-CSRF token for every sensitive request. Validate the Origin and/or Referer headers where appropriate. Configure authentication cookies with the SameSite=Lax or SameSite=Strict attribute where feasible. Ensure sensitive actions cannot be performed solely based on the presence of an authenticated session.
|