Create admin_controller.rb #99
Open
DryRunSecurity / General Security Analyzer
succeeded
Aug 13, 2025 in 1s
DryRun Security
Details
General Security Analyzer Findings: 1 detected
⚠️ Authorization Bypass via User-Controlled Parameters app/controllers/admin_controller.rb (click for details)
| Type | Authorization Bypass via User-Controlled Parameters |
| Description | The AdminController uses a before_action filter ensure_admin to check for administrative privileges. However, the ensure_admin method determines authorization solely based on user-controlled request parameters (params[:admin] or params[:role]). An attacker can set admin=true or role=admin in their request to bypass this check and gain unauthorized access to administrative functions, such as the /dashboard endpoint. |
| Filename | app/controllers/admin_controller.rb |
| CodeLink | rails-projects/app/controllers/admin_controller.rb Lines 1 to 19 in c0b0252 |
Loading