← Back to Jeniel Shah

Account Takeover via Broken Access Control — Gynzy

I found a broken access control vulnerability in Gynzy, an educational platform used to manage classrooms and student accounts. The flaw allowed a classroom administrator to change another student's email address without the required authorization, creating a path to account takeover.

Short version

How I found it

While examining Gynzy's account-management requests, I noticed that the email-update endpoint accepted a userId parameter. I wanted to see whether the backend enforced the same restrictions as the interface, so I tested the request against another student account under my control.

The bug

I modified the target userId in the email-update request and supplied an email address I controlled:

POST /<email-update-endpoint>
...
userId=<target-user-id>
email=<attacker-controlled-email>

The server accepted the request and updated the target account's email address. Although it verified that the student belonged to my classroom, it did not properly check whether I was authorized to modify that student's email.

The issue was a broken access control flaw: the backend validated the relationship between the accounts but failed to enforce authorization for the requested action.

Chaining it

The email change became more serious when combined with Gynzy's password recovery flow. Reset instructions were sent to the email address associated with the account, meaning an unauthorized email change could redirect the recovery process to an address I controlled.

Authenticated classroom administrator
                 ↓
     Unauthorized email modification
                 ↓
   Target account's email is changed
                 ↓
       Password recovery is initiated
                 ↓
  Reset instructions reach the new address
                 ↓
       Password is reset by the attacker
                 ↓
         Potential account takeover

The impact was not limited to the initial email-change request. The vulnerability could be chained with an existing account recovery mechanism, turning an authorization failure into a potential account compromise. I observed the behavior across multiple student account types in the classroom, increasing the potential scope of the issue.