Bug Description
The submitExam controller does not verify if a student has already submitted an exam before saving a new Submission document.
Because there is no application-level check and no unique database constraint, a student can send concurrent POST requests to POST /api/submissions/:examId/submit and generate multiple graded submissions for the same exam, allowing them to manipulate their final score.
Location & Severity
- File:
controllers/submissionController.js (Lines 4–36)
- Severity: High
Bug Description
The
submitExamcontroller does not verify if a student has already submitted an exam before saving a newSubmissiondocument.Because there is no application-level check and no unique database constraint, a student can send concurrent POST requests to
POST /api/submissions/:examId/submitand generate multiple graded submissions for the same exam, allowing them to manipulate their final score.Location & Severity
controllers/submissionController.js(Lines 4–36)