The giveReview function lacks a session state check, allowing teachers to manipulate student scores by submitting reviews when school is not in session.
Root Cause: The giveReview function only checks if the caller is a teacher and if the student exists, but doesn't verify if the school is currently in session.
Initial State:
School not in session
Teachers registered
Students enrolled
Attack Steps:
School session ends or hasn't started yet (inSession = false)
Malicious teacher calls giveReview with review = false
Student's score is reduced by 10 points
Process can be repeated to artificially lower student scores
Outcome: Students can have their scores manipulated outside of the legitimate school session period.
Implications:
Compromises the fairness of the grading system
Students could unfairly fail to meet cutOffScore
Violates the intended review timing constraints
Students can have scores manipulated outside session time
Potential for teacher abuse of the review system
Breaks core school grading integrity
Could prevent legitimate student graduation
Manual review
Add session state check to the giveReview function:
`inSession` not updated after during upgrade
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.