CVE-2026-5060
WordPress vulnerability analysis and mitigation

Overview

CVE-2026-5060 is an Insecure Direct Object Reference (IDOR) vulnerability in the MasterStudy LMS WordPress Plugin – for Online Courses and Education, developed by StyleMix. It affects all versions up to and including 3.7.14, allowing authenticated attackers with Instructor-level access or above to delete arbitrary file attachments belonging to any user. The vulnerability was published on July 29, 2026, and carries a CVSS v3.1 base score of 6.5 (Medium) (GitHub Advisory, Wordfence).

Technical details

The root cause is an authorization bypass through a user-controlled key (CWE-639) in the stm_lms_delete_cover() function located in _core/lms/classes/user.php. The function accepts a file_id parameter and passes it directly to WordPress's wp_delete_attachment() without verifying that the requesting user owns the referenced attachment. Because WordPress attachment IDs are sequential integers, an authenticated Instructor can enumerate IDs and issue deletion requests for attachments belonging to other users. The vulnerable code paths are visible at lines 2093 and 2107 of the affected source file (GitHub Advisory, WordPress Trac).

Impact

Successful exploitation allows an authenticated attacker with at minimum Instructor-level privileges to permanently delete any media attachment on the WordPress site, regardless of ownership. This results in a high integrity impact — course materials, user profile images, documents, and other uploaded content belonging to students, administrators, or other instructors can be irreversibly destroyed. There is no confidentiality or availability impact beyond the data loss caused by unauthorized deletion (GitHub Advisory, Wordfence).

Exploitation steps

  1. Obtain Instructor-level access: Register or compromise an account with Instructor-level privileges on a WordPress site running MasterStudy LMS ≤ 3.7.14.
  2. Identify the vulnerable endpoint: Locate the AJAX action or REST endpoint that invokes stm_lms_delete_cover(), typically triggered when an instructor removes a course cover image.
  3. Enumerate attachment IDs: WordPress attachment IDs are sequential integers. Begin with a known or guessed ID (e.g., start from 1 or a recently observed ID) and increment to discover valid attachment IDs belonging to other users.
  4. Craft malicious deletion requests: Send authenticated HTTP requests to the deletion endpoint with arbitrary file_id values corresponding to attachments owned by other users (e.g., students or administrators).
  5. Achieve unauthorized deletion: Because no ownership check is performed, wp_delete_attachment() executes and permanently removes the targeted attachment from the WordPress media library (GitHub Advisory, Wordfence).

Indicators of compromise

  • Logs: WordPress access logs showing repeated POST requests to the stm_lms_delete_cover AJAX action (admin-ajax.php?action=stm_lms_delete_cover) with sequentially incrementing file_id values from a single authenticated session.
  • Logs: WordPress debug or audit logs recording multiple wp_delete_attachment() calls in rapid succession from an Instructor-level user account.
  • File System: Unexpected disappearance of media files from wp-content/uploads/ directories, particularly files not associated with the acting instructor's own courses or profile.
  • Database: WordPress wp_posts table showing bulk deletion of records with post_type = 'attachment' attributed to an Instructor user in a short time window.

Mitigation and workarounds

Administrators should update the MasterStudy LMS plugin to a version newer than 3.7.14 (the patch was committed in changeset 3501788 to trunk). The fix adds ownership validation to the stm_lms_delete_cover() function to ensure users can only delete attachments they own. As a temporary workaround, consider restricting Instructor-level account registration to trusted users, or using a WordPress firewall plugin (e.g., Wordfence) to block unauthorized requests to the deletion endpoint. Audit existing instructor accounts for suspicious activity (WordPress Trac Changeset, Wordfence).

Additional resources


SourceThis report was generated using AI

Related WordPress vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-14270HIGH8.8
  • woocommerce-tm-extra-checkout-options-addon
NoYesJul 29, 2026
CVE-2026-5060MEDIUM6.5
  • masterstudy-lms-learning-management-system
NoYesJul 29, 2026
CVE-2026-8791MEDIUM6.4
  • booking-system-trafft
NoYesJul 29, 2026
CVE-2026-7436MEDIUM6.4
  • wpc-badge-management
NoYesJul 29, 2026
CVE-2026-6089MEDIUM4.9
  • easy-sticky-sidebar
NoYesJul 29, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management