Skip to content
Access control Write-up Intermediate

The Mutation Everyone Tested, and the One Field Nobody Did: Graph

The updateEnrollment GraphQL mutation checked that a student owned the enrollment record but did not check whether a student was allowed to set instructor-only fields such as finalGrade and gradeLockedByInstructor. A student could therefore set their own final grade to any value and lock it against instructor changes.

T4nv1 Follow

Published on medium.com

GraphQL’s flexibility is also where its security model tends to quietly fracture. A REST API typically ties authorization to an entire endpoint — you either can or can’t call it.

T4nv1, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The mutation enforced object-level ownership but had no separate role-based field-level authorization, so instructor-only input fields were settable by any student on their own record.

Impact

Any student could set their own final grade to an arbitrary value and lock it against instructor modification, undermining the grading system through the platform's legitimate API.

What the attacker needed

A student account; access to GraphQL introspection

The fix

The platform split grade-related fields into a separately authorised mutation and added role-based field validation as a backstop on the original mutation.

How it was found

  1. Retrieve the GraphQL schema through introspection and note input fields not exposed in the student UI.
  2. Send the updateEnrollment mutation against your own enrollment with the grade-related fields set.
  3. Observe that the mutation succeeds and the grade value changes.
  4. Revert the grade field to its original value after confirming the finding.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A GraphQL API lets a client ask for exactly the fields it wants, and one operation can accept many optional input fields. Here the server checked that the record belonged to the student, but never checked that a student should not be allowed to fill in grade fields meant for teachers. So a student could give themselves any final grade and stop teachers from changing it.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.