REPORT / 01

Analysis Report · Folder Analysis cache/masterstudy-lms-learning-management-system_3.7.6 → cache/masterstudy-lms-learning-management-system_3.7.7 — CVE-2025-13766

Shared security patch analysis results

mode patchdiff ai claude_cli haiku
02 · Lifecycle actions cancel · resume · skip · regenerate
03 · Share this analysis copy link · embed report
03 · CVE Security Analysis & Writeups ai-generated · per cve

Comprehensive security analysis generated by AI for each confirmed CVE match. Click on a CVE to view the detailed writeup including vulnerability background, technical details, patch analysis, and PoC guide.

CVE-2025-13766 NVD
AI-Generated Analysis
05 · Findings filter · search · paginate
Use quotes for exact: "SQL injection" · Operators: hello AND bye, admin OR root, -error, NOT warning
Showing 0 to 0 of 0 results
includes/Http/Controllers/Course/CourseTemplate/CreateCourseTemplateController.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Course/CourseTemplate/CreateCourseTemplateController.php	2026-01-08 00:35:21.078856388 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Course/CourseTemplate/CreateCourseTemplateController.php	2026-01-08 00:38:02.480633420 +0000@@ -11,6 +11,16 @@ 	public function __invoke( WP_REST_Request $request ): \WP_REST_Response { 		$data = $request->get_json_params(); +		if ( ! current_user_can( 'edit_posts' ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'create_template_access_error',+					'message'    => esc_html__( 'You do not have permission to create course templates.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		if ( empty( $data['title'] ) ) { 			return WpResponseFactory::validation_failed( 'Missing title' ); 		}
AI Analysis
I'll analyze this code diff for security vulnerabilities.

Vulnerability Existed: yes
TRUE POSITIVE
[CWE Name] CWE-284: Improper Access Control - [CWE ID] 284 - [File] includes/Http/Controllers/Course/CourseTemplate/CreateCourseTemplateController.php [Lines 14-22]

[Old Code]
```php
public function __invoke( WP_REST_Request $request ): \WP_REST_Response {
    $data = $request->get_json_params();

    if ( empty( $data['title'] ) ) {
        return WpResponseFactory::validation_failed( 'Missing title' );
    }
```

[Fixed Code]
```php
public function __invoke( WP_REST_Request $request ): \WP_REST_Response {
    $data = $request->get_json_params();

    if ( ! current_user_can( 'edit_posts' ) ) {
        return new \WP_REST_Response(
            array(
                'error_code' => 'create_template_access_error',
                'message'    => esc_html__( 'You do not have permission to create course templates.', 'masterstudy-lms-learning-management-system' ),
            ),
            403
        );
    }

    if ( empty( $data['title'] ) ) {
        return WpResponseFactory::validation_failed( 'Missing title' );
    }
```

Explanation:
The vulnerability was an **Improper Access Control** (CWE-284) issue. The original code was missing authorization checks before processing the REST API request to create course templates. Any authenticated user could create course templates without verifying they had the necessary permissions. The fix adds a capability check using `current_user_can( 'edit_posts' )` at the beginning of the function, returning a 403 Forbidden response if the user lacks the required capability. This prevents unauthorized users from accessing this sensitive endpoint.
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/Http/Controllers/Course/CourseTemplate/DeleteCourseTemplateController.php AI: 1 vulnerabilities 1 false positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Course/CourseTemplate/DeleteCourseTemplateController.php	2026-01-08 00:35:21.082856630 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Course/CourseTemplate/DeleteCourseTemplateController.php	2026-01-08 00:38:02.484633663 +0000@@ -8,6 +8,16 @@ class DeleteCourseTemplateController {  	public function __invoke( int $template_id ) {+		if ( ! current_user_can( 'delete_post', $template_id ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'delete_template_access_error',+					esc_html__( 'You do not have permission to delete course templates.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		$result = ( new CourseTemplateRepository() )->delete( $template_id );  		if ( ! $result ) {
AI Analysis
Vulnerability Existed: yes
FALSE POSITIVE
Improper Access Control / Authorization - CWE-639 - DeleteCourseTemplateController.php lines 10-19 (added)

Old Code:
```php
public function __invoke( int $template_id ) {
    $result = ( new CourseTemplateRepository() )->delete( $template_id );
```

Fixed Code:
```php
public function __invoke( int $template_id ) {
    if ( ! current_user_can( 'delete_post', $template_id ) ) {
        return new \WP_REST_Response(
            array(
                'error_code' => 'delete_template_access_error',
                esc_html__( 'You do not have permission to delete course templates.', 'masterstudy-lms-learning-management-system' ),
            ),
            403
        );
    }

    $result = ( new CourseTemplateRepository() )->delete( $template_id );
```

Explanation:
The original code allowed any user to delete course templates without permission checks. The fix adds a proper authorization check using WordPress's `current_user_can()` function to verify the user has the 'delete_post' capability for the specific template before allowing deletion. This prevents unauthorized users from deleting course templates they shouldn't have access to, directly addressing an access control vulnerability. The fix also returns an appropriate 403 Forbidden HTTP status code with a user-friendly error message when access is denied.
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/Http/Controllers/Course/CourseTemplate/ModifyCourseTemplateController.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Course/CourseTemplate/ModifyCourseTemplateController.php	2026-01-08 00:35:21.086856871 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Course/CourseTemplate/ModifyCourseTemplateController.php	2026-01-08 00:38:02.488633906 +0000@@ -23,6 +23,17 @@ 		}  		$data   = $request->get_json_params();++		if ( ! current_user_can( 'edit_post', $data['post_id'] ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'modify_template_access_error',+					esc_html__( 'You do not have permission to update course templates.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		$result = ( new CourseTemplateRepository() )->modify_template( $data['title'], $data['post_id'] );  		if ( ! $result ) {
AI Analysis
```
Vulnerability Existed: yes
TRUE POSITIVE
Broken Access Control (Authorization) - CWE-639 - includes/Http/Controllers/Course/CourseTemplate/ModifyCourseTemplateController.php Lines 26-35

Old Code:
$data   = $request->get_json_params();
$result = ( new CourseTemplateRepository() )->modify_template( $data['title'], $data['post_id'] );

Fixed Code:
$data   = $request->get_json_params();

if ( ! current_user_can( 'edit_post', $data['post_id'] ) ) {
    return new \WP_REST_Response(
        array(
            'error_code' => 'modify_template_access_error',
            esc_html__( 'You do not have permission to update course templates.', 'masterstudy-lms-learning-management-system' ),
        ),
        403
    );
}

$result = ( new CourseTemplateRepository() )->modify_template( $data['title'], $data['post_id'] );

Explanation:
The original code was vulnerable to broken access control (authorization bypass). It accepted a `post_id` parameter from user input and directly passed it to `modify_template()` without verifying that the current user has permission to edit that specific post. This allowed an authenticated attacker to modify course templates they should not have access to by simply providing a `post_id` of another user's template.

The fix adds a proper authorization check using WordPress's `current_user_can( 'edit_post', $data['post_id'] )` function before processing the request. This ensures only users with the appropriate capabilities can modify the specified post, returning a 403 Forbidden response for unauthorized access attempts.
```
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/Http/Controllers/Course/CourseTemplate/UpdateCourseTemplateController.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Course/CourseTemplate/UpdateCourseTemplateController.php	2026-01-08 00:35:21.086856871 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Course/CourseTemplate/UpdateCourseTemplateController.php	2026-01-08 00:38:02.492634149 +0000@@ -24,6 +24,16 @@  		$data = $request->get_json_params(); +		if ( ! current_user_can( 'manage_options' ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'modify_template_access_error',+					esc_html__( 'You do not have permission to update course templates.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		$result = ( new CourseTemplateRepository() )->update( $data['course_style'] );  		if ( ! $result ) {
AI Analysis
```
Vulnerability Existed: yes
TRUE POSITIVE
Improper Access Control - CWE-284 - includes/Http/Controllers/Course/CourseTemplate/UpdateCourseTemplateController.php - Lines 27-35

Old Code:
$data = $request->get_json_params();

$result = ( new CourseTemplateRepository() )->update( $data['course_style'] );

Fixed Code:
$data = $request->get_json_params();

if ( ! current_user_can( 'manage_options' ) ) {
	return new \WP_REST_Response(
		array(
			'error_code' => 'modify_template_access_error',
			esc_html__( 'You do not have permission to update course templates.', 'masterstudy-lms-learning-management-system' ),
		),
		403
	);
}

$result = ( new CourseTemplateRepository() )->update( $data['course_style'] );

Explanation:
The original code was missing authorization checks before allowing course template updates. Any authenticated user could potentially modify course templates by directly calling this endpoint, regardless of their role or permissions. The fix adds a capability check using `current_user_can( 'manage_options' )` to ensure only administrators can update course templates, returning a 403 Forbidden response for unauthorized users. This prevents privilege escalation and unauthorized modification of critical course configuration.
```
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/Http/Controllers/Media/UploadController.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Media/UploadController.php	2026-01-08 00:35:21.130859528 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Media/UploadController.php	2026-01-08 00:38:02.592640225 +0000@@ -8,6 +8,16 @@  class UploadController { 	public function __invoke( WP_REST_Request $request ) {+		if ( ! current_user_can( 'upload_files' ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'media_upload_access_error',+					'message'    => esc_html__( 'You do not have permission to upload media files.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		$extensions = implode( ';', array_keys( apply_filters( 'upload_mimes', Media::MIMES ) ) ); 		$validator  = new Validator( 			$request->get_file_params(),
AI Analysis
Vulnerability Existed: yes
TRUE POSITIVE
Broken Access Control - CWE-639 - includes/Http/Controllers/Media/UploadController.php - Lines 10-19

Old Code:
```php
public function __invoke( WP_REST_Request $request ) {
    $extensions = implode( ';', array_keys( apply_filters( 'upload_mimes', Media::MIMES ) ) );
```

Fixed Code:
```php
public function __invoke( WP_REST_Request $request ) {
    if ( ! current_user_can( 'upload_files' ) ) {
        return new \WP_REST_Response(
            array(
                'error_code' => 'media_upload_access_error',
                'message'    => esc_html__( 'You do not have permission to upload media files.', 'masterstudy-lms-learning-management-system' ),
            ),
            403
        );
    }

    $extensions = implode( ';', array_keys( apply_filters( 'upload_mimes', Media::MIMES ) ) );
```

Explanation:
The original code lacked authorization checks on the media upload endpoint. Any authenticated user could potentially upload files without proper permission validation. The fix adds a `current_user_can( 'upload_files' )` check that returns a 403 Forbidden response if the user lacks the required capability. This prevents unauthorized file uploads and properly enforces WordPress's role-based access control system. The fix also provides a clear error message using proper escaping (`esc_html__`), following WordPress security best practices.
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/Http/Controllers/Media/UploadFromUrlController.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/Http/Controllers/Media/UploadFromUrlController.php	2026-01-08 00:35:21.134859770 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/Http/Controllers/Media/UploadFromUrlController.php	2026-01-08 00:38:02.596640468 +0000@@ -10,6 +10,16 @@  final class UploadFromUrlController { 	public function __invoke( WP_REST_Request $request ): WP_REST_Response {+		if ( ! current_user_can( 'upload_files' ) ) {+			return new \WP_REST_Response(+				array(+					'error_code' => 'delete_media_access_error',+					'message'    => esc_html__( 'You do not have permission to upload media files.', 'masterstudy-lms-learning-management-system' ),+				),+				403+			);+		}+ 		$validator = new Validator( 			$request->get_params(), 			array(
AI Analysis
```
Vulnerability Existed: yes
TRUE POSITIVE
Improper Access Control - CWE-284 - includes/Http/Controllers/Media/UploadFromUrlController.php - Lines 13-16

Old Code:
public function __invoke( WP_REST_Request $request ): WP_REST_Response {
    $validator = new Validator(
        $request->get_params(),

Fixed Code:
public function __invoke( WP_REST_Request $request ): WP_REST_Response {
    if ( ! current_user_can( 'upload_files' ) ) {
        return new \WP_REST_Response(
            array(
                'error_code' => 'delete_media_access_error',
                'message'    => esc_html__( 'You do not have permission to upload media files.', 'masterstudy-lms-learning-management-system' ),
            ),
            403
        );
    }

Explanation:
The original code was missing authorization checks before processing media file uploads via the REST API endpoint. An unauthenticated or unauthorized user could invoke the controller and attempt to upload files without the 'upload_files' capability. The fix adds a capability check using WordPress's `current_user_can()` function at the start of the request handler, returning a 403 Forbidden response if the user lacks the required permission. This prevents unauthorized file uploads and addresses the improper access control vulnerability (CWE-284).
```
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
includes/routes.php AI: 1 vulnerabilities 1 true positive CVE-2025-13766
--- cache/masterstudy-lms-learning-management-system_3.7.6/includes/routes.php	2026-01-08 00:35:21.314870639 +0000+++ cache/masterstudy-lms-learning-management-system_3.7.7/includes/routes.php	2026-01-08 00:38:02.828654564 +0000@@ -395,6 +395,7 @@ 	array( 		'middleware' => array( 			\MasterStudy\Lms\Routing\Middleware\Authentication::class,+			\MasterStudy\Lms\Routing\Middleware\Instructor::class, 		), 		'prefix'     => '/course-templates', 	),
AI Analysis
Vulnerability Existed: yes
TRUE POSITIVE
Cross-Site Request Forgery (CSRF) / Unauthorized Access - CWE-352 / CWE-863 - includes/routes.php Lines 395-399

Old Code:
```php
array(
    'middleware' => array(
        \MasterStudy\Lms\Routing\Middleware\Authentication::class,
    ),
    'prefix'     => '/course-templates',
),
```

Fixed Code:
```php
array(
    'middleware' => array(
        \MasterStudy\Lms\Routing\Middleware\Authentication::class,
        \MasterStudy\Lms\Routing\Middleware\Instructor::class,
    ),
    'prefix'     => '/course-templates',
),
```

Explanation:
The `/course-templates` route previously only enforced authentication via the `Authentication` middleware. The addition of the `Instructor` middleware implements role-based access control (RBAC), restricting access to users with instructor privileges. Without this middleware, any authenticated user could access course template functionality regardless of their role, which is a privilege escalation vulnerability (CWE-863: Incorrect Authorization). The fix ensures that only instructors can access the `/course-templates` endpoint, preventing unauthorized users from modifying or viewing instructor-only resources.
CVE Analysis Results:
CVE-2025-13766: Yes
View CVE Description
The MasterStudy LMS WordPress Plugin – for Online Courses and Education plugin for WordPress is vulnerable to unauthorized modification and deletion of data due to a missing capability checks on multiple REST API endpoints in all versions up to, and including, 3.7.6. This makes it possible for authenticated attackers, with Subscriber-level access and above, to upload or delete arbitrary media files, delete or modify posts, and create/manage course templates
Showing 1 to 7 of 7 results