ECSEXCELON CYBER SOLUTIONS

Broken Access Control in a CRM: Role Tampering and Deleting the Owner

Two high-severity broken access control bugs in one CRM: a supervisor creating an Owner by editing a role value, and an Owner deleted by switching HTTP method.

By Excelon Cyber Solutions Security Team4 min read

While testing a web application (client and program name withheld), we found two separate "high" broken access control bugs in the same CRM. Both come down to the server trusting what the browser sends instead of checking what the caller is allowed to do. This post is a short, anonymised summary; the original first-person write-up is on Medium.

Key takeaways

  • A role dropdown that only shows safe options is not access control; the server must reject any role the caller is not allowed to assign.
  • "Only the Owner can delete users" must be enforced for every HTTP method, not just the buttons the UI exposes.
  • Test every role pair, with real requests in a proxy, not only through the interface.

How the application was meant to work

The CRM had three levels of user:

  • Owner: cannot be deleted, manages Supervisors and Agents, and cannot create another Owner.
  • Supervisor: can create Supervisors and Agents, cannot edit the Owner, and cannot delete anyone.
  • Agent: least privileged, no create, update or delete rights and no dashboard access.

Finding 1: privilege escalation by parameter tampering

When a Supervisor created a new user, the role dropdown offered only "Supervisor" and "Agent". Looking at the Owner's own profile showed that the stored role value was OWNER. Intercepting the create-user request in Burp Suite and changing the role parameter to that value let the Supervisor make any person an Owner. The server accepted whatever role string arrived and never checked it against the caller's own permissions.

Finding 2: deleting the Owner with a different HTTP method

There was no delete function for the Owner in the interface, and deleting users was meant to be an Owner-only action. The listing page used a GET request that loaded every user's ID, including the Owner's. Sending an OPTIONS request to the user endpoint revealed that DELETE was supported, and a DELETE request carrying the Owner's ID removed the account. No check confirmed that the caller was the Owner, or that they were allowed to delete that particular user. This is a broken object level authorization (IDOR) problem combined with a missing function level check.

How to fix it

  1. Whitelist assignable roles on the server. Map each caller role to the roles it may create and reject everything else, whatever the form showed.
  2. Authorise every method on every route. Deny by default, then allow each role only the verbs it needs. Disable methods you do not use.
  3. Check the object, not just the user. Before deleting or editing a record, confirm the caller may act on that specific target (an Owner can never be removed by a lower role).
  4. Never take identity or role from the request body. Use the verified session.
  5. Add a permission matrix test. For each role and each endpoint, assert what must succeed and what must return 403.
  6. Log denied attempts so tampering shows up in monitoring.

Frequently asked questions

Is changing a role value really a vulnerability if the UI hides it?

Yes. Anything a browser sends can be edited. If the server accepts a role the user should not be able to assign, the control is bypassed, and OWASP lists this under Broken Access Control (A01:2021).

Why did switching to DELETE work?

The delete rule was probably attached to the interface and one route, not enforced for every method. Servers that expose extra HTTP methods without a permission check let attackers use the one that was forgotten.

How do we test for this in our own CRM?

Create one account per role, capture requests as the lowest role, then replay them with higher-role parameters, other users' IDs and alternative HTTP methods. Anything that should be refused but succeeds is a finding.

Further reading

Need this tested?

Have our senior analysts test your application

Excelon Cyber Solutions runs web application, API and network penetration tests across India, with every finding reproduced and documented before it reaches your report.

WHATSAPP