Miggo Logo

CVE-2025-62401: Moodle has a time restriction bypass

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.09556%
Published
10/23/2025
Updated
10/24/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
moodle/moodlecomposer>= 5.0.0-beta, < 5.0.35.0.3
moodle/moodlecomposer>= 4.5.0-beta, < 4.5.74.5.7
moodle/moodlecomposer>= 4.2.0-beta, < 4.4.114.4.11
moodle/moodlecomposer< 4.1.214.1.21

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability in Moodle's timed assignment feature allowed students to bypass the time restriction by having the timer start automatically upon visiting the submission page, rather than when they explicitly chose to begin. The analysis of the provided patch (commit 78a3fe6c618676dfc53ea538abbfe35e60674eeb) reveals the root cause and the affected functions.

The core of the vulnerability lies in the get_user_submission and get_group_submission functions within public/mod/assign/locallib.php. These functions would check if an assignment had a time limit and if the timer had started. If not, they would immediately set the timestarted field upon page load when the action was 'editsubmission'. This allowed a student to trigger the timer simply by loading the page, then leave and come back later to complete the assignment, exceeding the intended time limit.

The patch rectifies this by introducing an explicit confirmation step. A new begin=1 URL parameter is required to start the timer. The get_user_submission and get_group_submission functions were updated to only start the timer if this parameter is present.

Consequently, the mod_assign\output\user_submission_actionmenu::export_for_template function was modified to add this begin=1 parameter to the URL of the 'Begin assignment' button. Furthermore, the assign::view_edit_submission_page function was updated to prevent direct rendering of the submission form for a timed assignment that has not been started, instead showing a confirmation dialog.

Therefore, the identified functions are directly involved in the vulnerable process of automatically starting the assignment timer. During an exploit, these functions would be present in the stack trace as the student navigates to the submission page of a timed assignment.

Vulnerable functions

assign::get_group_submission
public/mod/assign/locallib.php
This function was responsible for creating a group submission. The vulnerability lies in the fact that it would start the timer for a timed assignment as soon as the submission page was accessed, without explicit user confirmation. The patch adds a check for a 'begin' parameter, ensuring the timer only starts when the user explicitly agrees to start the assignment.
assign::get_user_submission
public/mod/assign/locallib.php
Similar to get_group_submission, this function handled individual user submissions. It would start the timer for a timed assignment upon page load, allowing a user to bypass the time restriction. The fix introduces a 'begin' parameter check to prevent the timer from starting automatically.
assign::view_edit_submission_page
public/mod/assign/locallib.php
This function rendered the submission editing page. Before the patch, it would directly render the submission form, which in turn would trigger the timer to start via get_user_submission or get_group_submission. The patch modifies this function to show a confirmation button first, preventing the form from loading and the timer from starting until the user confirms.
mod_assign\output\user_submission_actionmenu::export_for_template
public/mod/assign/classes/output/user_submission_actionmenu.php
This function is responsible for generating the action menu on the assignment page, including the 'Add submission' or 'Edit submission' button. The vulnerability was that the URL generated did not differentiate between viewing the submission page and starting a timed attempt. The patch adds a 'begin=1' parameter to the URL for timed assignments, which is then used by other functions to correctly handle the start of the timer.

WAF Protection Rules

WAF Rule

*n issu* in Moo*l*'s tim** *ssi*nm*nt ***tur* *llow** stu**nts to *yp*ss t** tim* r*stri*tion, pot*nti*lly *ivin* t**m mor* tim* t**n *llow** to *ompl*t* *n *ss*ssm*nt.

Reasoning

T** vuln*r**ility in Moo*l*'s tim** *ssi*nm*nt ***tur* *llow** stu**nts to *yp*ss t** tim* r*stri*tion *y **vin* t** tim*r st*rt *utom*ti**lly upon visitin* t** su*mission p***, r*t**r t**n w**n t**y *xpli*itly **os* to ***in. T** *n*lysis o* t** pro