How a broken access control check led me to a full system data export.
During bug hunting for a SaaS application, I discovered one of the most interesting vulnerability chains I've encountered so far. And the craziest part is that it wasn't even a difficult/technical one. I just happened to accidentally stumble upon it when I changed my account's username to just admin.
It Started With a Username Change
I was testing the application using a regular Member (the lowest privilege account) with no administrative privileges. While checking for broken access control, I just randomly changed my username which was a test user, to admin.
And to my surprise, the application suddenly started showing me super admin settings that weren't visible before in the UI. I could navigate through organization settings, their Mongodb configuration, AI-related settings and other privileged sections.
At first, I thought I'd managed to escalate my privileges just from that. But after testing the backend, I realized that wasn't entirely true. Most privileged write operations still returned 403 Forbidden. I tampered with the parameters of different endpoints and their requests I had found on burp, but I couldn't really bypass my way into any super-admin settings, either read or write.
It was just that the frontend was simply trusting a user controlled username to determine which administrative pages to display. That was already a security issue, although I hadn't demonstrated any impact yet for this bug to be either a high or a critical.
Discovering the Data Export Endpoint
While exploring the newly visible super-admin settings, I came across a data-transfer feature as well like the other super admin endpoints.
A regular Member shouldn't have been able to discover or use it through the normal interface. Naturally, I wanted to check whether the backend enforced the same restriction.
I intercepted the requests in Burp and started testing the export endpoint using my original Member privileges.
Initially, the requests weren't successful. But the difference was that the other endpoints which were returning a 403 despite trying every method to bypass, this data export endpoint returned a 500 Internal server error instead.
I kept examining the request parameters in Burp Repeater. Eventually, I tried disabling the unnecessary export options while leaving organization data enabled.
And this time? My favourite status code happened: HTTP 200 OK 😍
The server returned a massive ZIP archive. It was unbelievable at first. I initially assumed it would contain data from my own organization. But I was wrong.
The ZIP Contained Data From All Organizations of the Platform
After downloading and inspecting the archive, I discovered that it wasn't an ordinary organization export.
It was a full-system/database export.
The archive contained records spanning all organizations, including membership information, customer documentation, internal architecture details, security-related documents, and other sensitive application data. More concerningly, it also contained 14 distinct plaintext API keys and OAuth client secrets associated with different environments.
I had accessed information that was never supposed to be available to my account, let alone data belonging to completely unrelated organizations.
The same Member session could also request a presigned cloud-storage upload URL associated with the import workflow. I didn't attempt to import data, so that part remained a potential integrity risk rather than a demonstrated compromise.
The confirmed export alone was enough to establish a Critical cross-tenant confidentiality issue.
And the strangest part was that my account was still a regular Member. I did not have any privileges, or demonstrated stolen credentials or auth bypass.
Just inconsistent authorization enforcement.
Understanding the Vulnerability Chain
Looking back, the chain involved two distinct access-control weaknesses.
The first was a frontend authorization flaw. Changing my username to admin exposed privileged settings and helped me discover functionality that wasn't intended for my role.
The second, and much more serious issue, was a missing backend authorization check on the full-system export functionality.
The username change didn't technically grant the backend any additional privileges. In fact, the export endpoint could be invoked directly without it.
But the frontend bypass was how I discovered the vulnerable functionality in the first place. I also confirmed a separate issue where a regular Member could read super-admin configuration even though modifying that same configuration was correctly forbidden.
It was a good example of how security controls can work correctly in one place and fail completely in another.
Conclusion
This was probably one of the most easiest yet the most critical (CVSS 9.6) vulnerabilities I've found till date lol.
What makes it interesting to me isn't that I used some complicated exploitation technique. I didn't. I literally stumbled upon a hidden administrative feature after changing my username to admin, and that eventually led me to discover a completely separate backend authorization flaw.
The frontend mistake didn't actually make me a super admin. The backend vulnerability didn't even require the username trick to work. But finding one led me to the other.
The biggest takeaway for me was how inconsistently access controls can be implemented within the same application. Some endpoints correctly rejected unauthorized requests with 403, while another exposed data that should never have been accessible to my account.
And all of this started because I randomly decided to name my test account admin. 😂