Low
The startSession
function allows the principal to set any value for the cutOffScore
parameter without validation, potentially leading to impossible graduation requirements or allowing all students to pass regardless of performance.
The startSession
function sets the cutOffScore
parameter without any bounds checking:
There are no validation checks to ensure that _cutOffScore
is within a reasonable range (e.g., between 0 and 100). This means:
The principal could accidentally or maliciously set cutOffScore
to an impossibly high value (e.g., 1000), making it impossible for any student to graduate
The principal could set cutOffScore
to 0, allowing all students to graduate regardless of their performance
There's no protection against input errors when calling this critical function
Since the cutOffScore
directly affects whether students can graduate after the session ends, this validation gap could severely impact the proper functioning of the educational system.
Manual code review
Add parameter validation to ensure cutOffScore
is within a reasonable range:
This ensures that graduation requirements are neither impossible nor trivial to meet.
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.