From Student to Admin in 60 Seconds: Breaking an EdTech Platform's Access Controls
A government-backed EdTech platform serving 23,000+ students let a free student account promote itself to admin through an unprotected role-assignment API, then dump the entire user database. The criticals are fixed. Here is the full chain.
Target: Undisclosed — a government-backed EdTech / innovation platform. Reported privately to the vendor. The company is not named here, by policy.
I made a free student account, called one API, and 60 seconds later that account was an administrator of a platform serving more than 23,000 students.
No exploit chain of memory-corruption wizardry. No stolen credentials. Just an endpoint that never asked who was calling it.
The platform is a government-backed educational-technology service that universities use as an innovation hub. Tens of thousands of students, faculty across many institutions, certificates, program records, the usual PII — all behind an API that, it turned out, documented itself in full and then forgot to lock the one door that mattered.
Everything here was reported privately and the critical findings have since been fixed. In line with my disclosure policy, this post names no organization, shows no live endpoint or domain, and writes about generalized API routes rather than exact paths. The HTTP examples below are redacted and reconstructed to show the shape of the flaw, not to hand anyone a working payload.
The scoreboard
| # | Finding | Severity | CVSS | Status |
|---|---|---|---|---|
| 1 | Broken access control — student to admin | High | 8.8 | Fixed |
| 2 | Mass PII disclosure — 23,000+ users | High | 7.5 | Fixed |
| 3 | Debug/test endpoints exposed in production | Medium | 6.5 | Fixed |
| 4 | Email-verification bypass | Medium | 5.3 | Fixed |
| 5 | Token/information-disclosure hygiene | Low | 3.1 | Fixed |
The headline is Finding 1, but the story is how cheaply the whole chain connected: public documentation → free account → unprotected privilege escalation → the entire database. One free account, no money, about a minute of real work.
Reconnaissance: the platform that documented itself
I always start by asking what the target is willing to tell me about itself for free. Here, it told me everything.
The backend was a modern framework that ships interactive API documentation by default. In production, the health endpoint answered a plain unauthenticated request with its environment:
GET /[REDACTED]/health HTTP/1.1
Host: [REDACTED]
HTTP/1.1 200 OK
{"status":"ok","env":"development"}
env: development on a production host is a tell. It usually means the safety rails that a framework disables in dev — verbose errors, open docs, test routes — are still down. They were.
The full interactive documentation and a machine-readable schema were both reachable with no authentication: roughly 685 KB of OpenAPI describing around 370 endpoints. Every route, every parameter, every request and response shape, every role the platform understood. That schema replaced hours of blind enumeration with a single download, and it quietly pointed at exactly the endpoints that would matter — the registration flow, the role-assignment route, and the user-listing APIs.
This is not a flaw in the framework. It does the right thing for local development. The flaw is shipping to production with that configuration still on.
The kill chain
Step 1 — A free account, and a verification check that wasn't one
Self-registration for students was open. Registration required an email-verification token parameter, which looked like a reasonable control — until I read the schema and tried the obvious.
Hardcoded test values were accepted as valid verification tokens:
POST /[REDACTED]/register HTTP/1.1
Content-Type: application/json
{"email":"attacker@example.com","password":"[REDACTED]","verification":"test"}
HTTP/1.1 200 OK
{"user_id":"[REDACTED]","role":"student"}
test, TEST, and bypass each minted an account instantly, with no OTP and no proof that I controlled the email address. Any other value threw a raw 500 Internal Server Error instead of a clean 400 — an unhandled exception, which is itself a signal that this path wasn't being validated the way the developers believed.
The aha here was small but important: a control existed, which is why nobody had flagged it, but it had a backdoor baked in for testing that had never been removed. I now had a logged-in student token bound to an address I didn't own.
Step 2 — The endpoint that never asked who was calling
The registration endpoint was actually careful in one respect: it hardcoded the student role server-side, so you could not register yourself as faculty or admin by tampering with the request body. Someone had thought about privilege escalation at that door.
But the schema listed a sibling route in the same API group — a role-assignment endpoint. I called it with my student token, naming my own user ID and the admin role:
POST /[REDACTED]/assign-role HTTP/1.1
Authorization: Bearer <student-token>
Content-Type: application/json
{"user_id":"<my-own-id>","role":"admin"}
HTTP/1.1 200 OK
{"user_id":"<my-own-id>","role":"admin","updated":true}
It worked. No check on who was calling it. No check that the caller was already an admin. A student-level token could set any user ID to any role.
That is the entire finding. The registration door was bolted; the role-assignment door, three feet away in the same corridor, had no lock at all. The developers had reasoned about one entry point and missed that a second one reached the same privileged capability.
Step 3 — Proving it end to end, with two accounts
A single account promoting itself is convincing, but a self-referential test leaves room for doubt — maybe the token carried something I couldn't see. So I ran the clean version:
- Account A (a plain student) called the role-assignment endpoint against Account B (another plain student), setting B to admin.
- Account B then used admin-only capabilities it had never been granted directly — minting role tokens for other users and reading admin-only reports.
Two separate accounts, the privilege flowing from one to the other through the broken endpoint, and the escalated account exercising real admin power. That removed any ambiguity: this was a true authorization failure, not a quirk of my own session.
Attacker cost: one free account, about 60 seconds, and $0.
Step 4 — Admin access, and the whole database
With an admin token, the rest was housekeeping. The user-listing API returned the entire user base to any authenticated caller — and now I was holding admin.
The listing paginated at 1,000 records a page across 24 pages: more than 23,000 users, each with name, email address, and phone number. The student-facing variant of this listing had no role gate at all; the admin variant of the same listing already enforced a proper role check. Same data, two doors, one of them wide open — the exact pattern from Finding 1, repeated.
It didn't stop at the main listing. Related routes leaked through object references too:
- Profile lookup by user ID (classic IDOR)
- Profile lookup by email address
- A student leaderboard that exposed admission numbers
- One endpoint that returned staff names and official email addresses with no authentication at all
I captured a sample of 1,000 records as evidence that the exposure was real and complete, stored it securely, and offered to delete it as part of the disclosure. I did not pull all 23,000 — proving the exposure does not require hoarding the data.
Debug and test endpoints: the map that made it easy
Two of the five findings deserve their own mention because they are what turned a hard assessment into an easy one.
The production server was running in development mode (env: development), and with it came a set of routes that should never face the internet:
- Debug data dumps and debug ID-mapping routes
- A debug "fix" operation
- Test exception endpoints — reachable without authentication — that deliberately forced
500,409, and422errors, revealing database constraint behavior and internal data shapes - The full interactive documentation and the 685 KB schema covering ~370 routes
None of these are a breach on their own. Together they are a guided tour. The schema handed me the API map; the error-forcing routes confirmed how the backend reacted to malformed input; the debug routes filled in the rest. Finding 1 and Finding 2 were fast because of this.
What was properly secured
A fair write-up gives credit, and this platform got real things right. I tested the usual suspects and they held:
- CORS was configured correctly — no origin reflection, no wildcard-with-credentials.
- SQL injection on the login and auth forms produced no errors or timing signals.
- File upload enforced server-side validation and rejected PHP shells and polyglot files.
.gitand.envwere blocked at the web-server layer.- JWT
alg:nonewas properly rejected — I tried, it refused. - An automated vulnerability scan across five live hosts returned zero findings. The real issues here were logic and authorization flaws, invisible to a scanner.
- JavaScript bundles leaked no API keys or secrets.
That last point matters: the serious problems on this platform were all business-logic and access-control failures. No off-the-shelf tool would have caught the role-assignment flaw. It took reading the schema and asking "who is allowed to call this?" of every privileged route.
Impact assessment
With the chain complete, an attacker starting from a free account could have:
- Promoted themselves — or any account — to administrator.
- Created faculty and staff accounts and approved pending users.
- Read the PII of 23,000+ students: names, emails, phone numbers, admission numbers.
- Modified programs, certificates, and records — the kind of tampering that undermines the integrity of an academic platform, not just its confidentiality.
- Harvested staff identities from an unauthenticated endpoint for targeted phishing.
For a government-backed service holding student data, that is a full platform takeover reachable by anyone on the internet with a browser.
Finding 5 — Token and hygiene issues
Lower severity, but worth closing:
- Access tokens (JWT) carried a one-year expiry. A stolen token stays valid for a full year, with no practical revocation window. Short-lived access tokens with refresh rotation would have cut that to minutes.
- HS256 was in use — acceptable, and
alg:nonewas correctly rejected on test. env: developmentleaked through the health endpoint, as above.
Remediation recommendations
What I suggested, in priority order:
- Add server-side authorization to every state-changing endpoint, and verify it at the route handler, not just in the client or a shared middleware you assume runs everywhere. The role-assignment endpoint needed a single check: is the caller an admin?
- Treat the registration role-hardcoding as the standard, not the exception. Every privileged capability in that API group should enforce the same gate the careful endpoints already did.
- Turn off development mode in production — disable the interactive docs, the schema, the debug routes, and the test-exception endpoints with a build-time configuration flag.
- Remove hardcoded verification bypass tokens and return a clean
400for invalid input instead of a500. - Add role checks to the student-facing listing APIs so they match the admin variants that were already gated.
- Shorten token lifetime and add revocation.
- Rate-limit and paginate the listing endpoints so bulk extraction is slow and noisy even if an authz check is ever missed again.
Responsible disclosure timeline
Kept relative, in line with the policy — absolute dates plus a public changelog can fingerprint a vendor.
- Day 0 — Found the issues during an authorized assessment. Wrote a detailed report with exact reproduction steps for the team.
- Day 0 — Sent the report privately to the organization's security contact, with evidence stored securely and an offer to delete the captured sample.
- Day N — Offered to re-test after patching.
- Day N — Fixes shipped; vulnerabilities believed to be patched.
- Today — This write-up published, anonymized.
Lessons for developers
- Authorization is per-endpoint, not per-feature. The team secured registration and genuinely reasoned about privilege escalation there — then shipped a sibling route to the same capability with no check. If a request can change a role, grant access, or mint a token, the handler itself must verify the caller. Don't assume a gate three endpoints over covers this one.
- "A control exists" is not "the control works." Email verification was present and bypassable with the string
test. Test backdoors have a way of surviving into production. Grep your codebase for them before every release. - Dev mode in production is a force multiplier. It didn't cause the access-control bug, but it handed an attacker the full map, the error oracle, and the debug tooling to find and confirm it in minutes. One config flag closes all of it.
- Your own API schema is the best recon tool an attacker has. If it's public, assume every route in it will be probed. Publish docs behind auth, or not at all in production.
- Mirror your gated and un-gated siblings. The admin listing checked roles; the student listing didn't, for the same data. Whenever two endpoints touch the same resource, their authorization must match.
- Scanners won't save you here. Zero automated findings across five hosts, and the platform was still one request away from takeover. Logic and access-control flaws need a human reading the schema and asking "who's allowed to call this?"
If you build or defend a platform like this, do the exercise I did: pull your own OpenAPI schema and, for every state-changing route, write down who is authorized to call it and where that check lives. The gaps tend to fall out of that list immediately.
Tools: passive recon and subdomain mapping, technology fingerprinting, the target's own OpenAPI schema for route discovery, then manual testing with an HTTP client and browser DevTools. No automated exploitation against user data.
Want a review of your own API's authorization model? Reach me at hello@jmadhan.me. — J Madhan, Security Researcher, jmadhan.me
Disclaimer: All vulnerabilities described in this post have been responsibly disclosed to the affected organization and are believed to be patched. No real user data is exposed in this write-up. Evidence was stored securely and handled per responsible disclosure guidelines.