The vulnerability allows a privilege escalation where a user can view the admin dashboard by manipulating the isMasterAdmin parameter in the login response. This indicates a lack of server-side authorization when accessing the admin dashboard.
The analysis of the patch commit 3e72b2a9a4f50f98cf1f6cf13fa3e405715bb370 reveals the fix. The core of the fix is in AdminDashboard/Serve.ts. A new function, ensureMasterAdminAccess, is introduced to validate the user's master admin status by decoding the JWT access token on the server. This function is then hooked into the application's initialization process within the init function of AdminDashboard/Serve.ts.
The vulnerable function is identified as init in AdminDashboard/Serve.ts because it was responsible for setting up the admin dashboard without enforcing the necessary master admin check. The vulnerability was one of omission, where the server trusted the client-provided isMasterAdmin status. By patching the init function to include the ensureMasterAdminAccess check, the vulnerability is remediated. Any attempt to access the admin dashboard now triggers this server-side validation, preventing unauthorized access.