Description
The The School Management – Education & Learning ERP plugin for WordPress is vulnerable to generic SQL Injection via 'order[0][dir]' Parameter in all versions up to, and including, 5.4 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for authenticated attackers, with custom-level access and above, to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database. This vulnerability is replicated across seven or more AJAX handlers including wlsm-fetch-staff-classes, wlsm-fetch-notices, wlsm-fetch-subjects, wlsm-fetch-inquiries, wlsm-fetch-staff-employee, and wlsm-fetch-payments, and the missing nonce verification on several of these handlers also enables CSRF-chained exploitation.
References
https://www.wordfence.com/threat-intel/vulnerabilities/id/c3f0ff27-49d7-4aa0-aa00-2853eadecddb?source=cve
https://plugins.trac.wordpress.org/changeset?reponame=&old=3570107%40school-management-system&new=3570107%40school-management-system
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.4/admin/inc/school/staff/class/WLSM_Staff_Class.php#L82
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.4/admin/inc/school/staff/class/WLSM_Staff_Class.php#L558
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.4/admin/inc/school/staff/class/WLSM_Staff_Class.php#L51
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.4/admin/inc/school/staff/class/WLSM_Staff_Class.php#L49
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.4/admin/inc/school/staff/class/WLSM_Staff_Class.php#L160
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.3/admin/inc/school/staff/class/WLSM_Staff_Class.php#L82
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.3/admin/inc/school/staff/class/WLSM_Staff_Class.php#L558
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.3/admin/inc/school/staff/class/WLSM_Staff_Class.php#L51
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.3/admin/inc/school/staff/class/WLSM_Staff_Class.php#L49
https://plugins.trac.wordpress.org/browser/school-management-system/tags/5.3/admin/inc/school/staff/class/WLSM_Staff_Class.php#L160