Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104022 Overview
CVE-2026-104022 is a privilege escalation vulnerability [CWE-269] in the Academy LMS WordPress plugin affecting all versions up to and including 4.0.3. The flaw resides in the guardian REST API's add_child() function, which calls add_role('academy_student') on any existing WordPress account resolved from the attacker-supplied email parameter. The role grant executes before Store::link() validates the guardian-ward relationship and is never rolled back when validation fails. Authenticated attackers holding the academy_guardian role or higher can promote any existing WordPress account, including their own, to academy_student.
Critical Impact
A guardian-role user can permanently add edit_posts and, when the student file-upload setting is enabled, upload_files capabilities to their own account by submitting their own email to the guardian endpoint.
Affected Products
- Academy LMS – AI Course Builder, Quizzes, Certificates & eLearning plugin for WordPress
- All versions up to and including 4.0.3
- WordPress sites with the academy_guardian role provisioned
Discovery Timeline
- 2026-10-10 - CVE-2026-104022 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-104022
Vulnerability Analysis
The vulnerability is an improper privilege management flaw in the plugin's guardian-to-ward linking workflow. The guardian REST API endpoint accepts an email parameter identifying the ward to attach. When the endpoint handler invokes add_child(), it resolves the email with email_exists() and immediately applies add_role('academy_student') to the returned user ID. Only after the role assignment does the handler call Store::link() to validate whether the guardian-ward pairing is legitimate.
Because Store::link() is also responsible for rejecting invalid pairings — including self-linking — any WP_Error it returns leaves the earlier role assignment intact. The result is that an attacker can target their own account or any arbitrary existing account by email, and the elevated academy_student role persists regardless of the validation outcome.
Root Cause
The root cause is an ordering and rollback defect. The code performs a state-changing capability grant before authorization checks complete, and omits compensating logic to revert the grant when the downstream validator fails. This matches the [CWE-269: Improper Privilege Management] pattern, where a privileged operation is executed outside the boundary of its authorization gate.
Attack Vector
Exploitation requires an authenticated session with the academy_guardian role or higher. The attacker sends a request to the guardian link endpoint with the email field set to the target account's address. For self-escalation, the guardian supplies their own email; email_exists() resolves to their own user ID, Store::link() rejects the self-link, but the add_role('academy_student') call has already granted Contributor-equivalent edit_posts capability. When the plugin's student file-upload setting is enabled, the attacker also gains upload_files, equivalent to the Author role. See the Wordfence Vulnerability Report and the vulnerable code in guardian/rest-api.php.
Detection Methods for CVE-2026-104022
Indicators of Compromise
- WordPress user accounts holding both academy_guardian and academy_student roles simultaneously, which is not a normal provisioning state.
- Unexpected academy_student role assignments on administrator, editor, or other non-learner accounts.
- REST API traffic to the Academy guardian link endpoint containing an email parameter matching the authenticated requester's own address.
- New posts or uploaded media authored by accounts that were previously limited to guardian capabilities.
Detection Strategies
- Query the wp_usermeta table for wp_capabilities entries containing both academy_guardian and academy_student and alert on matches.
- Review web server and WordPress REST logs for repeated POST requests to the guardian ward-linking route by the same user ID.
- Correlate role-change audit events emitted by WordPress security plugins against account activity to flag self-escalation patterns.
Monitoring Recommendations
- Enable WordPress audit logging to capture set_user_role and add_user_role events with user ID and source IP context.
- Monitor for edit_posts and upload_files capability usage by accounts not originally provisioned with those capabilities.
- Alert when the Academy plugin's student file-upload setting is enabled, as it increases the blast radius of successful exploitation.
How to Mitigate CVE-2026-104022
Immediate Actions Required
- Update the Academy LMS plugin to a version later than 4.0.3 that includes the fix referenced in the WordPress changeset.
- Audit all user accounts for unexpected academy_student role assignments and remove them where unauthorized.
- Review posts and uploaded files created by accounts that received the elevated role and remove any that are malicious.
Patch Information
The vendor addressed the issue in the Academy LMS plugin following version 4.0.3. The fix is published in the plugin's trac repository; see the WordPress Changeset and the referenced source files in guardian/rest-api.php and guardian/store.php for the pre-patch code paths.
Workarounds
- Disable the Academy LMS plugin on affected sites until the patched version is deployed.
- Restrict assignment of the academy_guardian role to trusted users only, reducing the pool of accounts able to exploit the flaw.
- Disable the student file-upload setting to prevent attackers from gaining upload_files capability through successful escalation.
- Use a web application firewall rule to block REST requests to the guardian link endpoint where the submitted email matches the requesting user's own address.
# Configuration example: audit WordPress accounts for unauthorized academy_student grants
wp user list --role=academy_student --fields=ID,user_login,user_email,roles
wp user list --role=academy_guardian --fields=ID,user_login,user_email,roles
# Remove the academy_student role from a specific user if unauthorized
wp user remove-role <USER_ID> academy_student
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

