Executive brief
Masteriyo LMS is a WordPress plugin for building and managing online learning courses. The plugin fails to properly sanitize course custom field data before displaying it to visitors, allowing instructors to inject malicious scripts that execute in the browsers of anyone viewing the course—including administrators with full site access. An attacker with instructor privileges can exploit this to steal credentials, modify course content, or compromise the entire WordPress site.
Technical details
This is a stored cross-site scripting (XSS) vulnerability in the Masteriyo LMS WordPress plugin (versions before 3.4.0). The vulnerability occurs because course custom field labels and values are not properly sanitized or escaped before being output in a JSON block on publicly-viewable course pages. An authenticated user with the course-author (instructor) role can inject arbitrary HTML and JavaScript via the REST API endpoint `/masteriyo/v1/courses` by crafting malicious payloads in custom field values or keys. The injected payload breaks out of the JSON context and executes as HTML in the page, running in the security context of any visitor, including administrators. The attack requires valid instructor credentials and WordPress REST nonce, but does not require administrator approval of the injected content. Patch is available in version 3.4.0 and later.
Affected products
- Masteriyo LMS 1.18.0 through 3.3.3
Timeline
- 2026-09-03: disclosed
- 2026-09-05: patched: Fixed in version 3.4.0