Frontend Post Submission Manager Lite <= 1.2.7 - Unauthenticated Open Redirect via 'requested_page' Parameter
Description
The Frontend Post Submission Manager Lite plugin for WordPress is vulnerable to Open Redirection in all versions up to, and including, 1.2.7 due to insufficient validation on the 'requested_page' POST parameter in the verify_username_password function. This makes it possible for unauthenticated attackers to redirect users to potentially malicious sites if they can successfully trick them into performing an action such as clicking on a link.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NTechnical Details
>=1.0.0 <=1.2.7Source Code
WordPress.org SVNThis research plan outlines the steps required to demonstrate an unauthenticated Open Redirect vulnerability in the **Frontend Post Submission Manager Lite** plugin. ### 1. Vulnerability Summary The **Frontend Post Submission Manager Lite** plugin (versions <= 1.2.7) is vulnerable to an unauthentic…
Show full research plan
This research plan outlines the steps required to demonstrate an unauthenticated Open Redirect vulnerability in the Frontend Post Submission Manager Lite plugin.
1. Vulnerability Summary
The Frontend Post Submission Manager Lite plugin (versions <= 1.2.7) is vulnerable to an unauthenticated Open Redirect. The vulnerability exists within the verify_username_password function, which processes login or verification requests from the frontend. The function utilizes a POST parameter named requested_page to redirect users after processing, but it fails to validate that the URL is local to the WordPress installation using wp_validate_redirect() or wp_safe_redirect(). This allows an attacker to craft a request that redirects a victim to an external, potentially malicious domain.
2. Attack Vector Analysis
- Endpoint: The plugin likely hooks
verify_username_passwordto a common initialization hook likeinitorwp_loadedto intercept POST requests. - Vulnerable Parameter:
requested_page(POST). - Authentication: None required (Unauthenticated).
- Trigger: A POST request containing the parameter that triggers the login/verification logic. This is typically associated with a frontend login form provided by the plugin.
3. Code Flow (Inferred)
- Entry Point: The plugin registers a hook:
add_action('init', '...verify_username_password')or similar in the main plugin file or an includes file. - Processing: The function
verify_username_password()is executed on every page load. - Condition: It checks if specific POST parameters are set (e.g., a "login" button name or a specific action).
- Vulnerable Sink:
if ( isset( $_POST['requested_page'] ) ) { $redirect_url = $_POST['requested_page']; wp_redirect( $redirect_url ); // Redirects without validation exit; } - Result: The browser receives a
302 Foundheader with theLocationset to the attacker-supplied external URL.
4. Nonce Acquisition Strategy
Login forms and frontend submission forms often use nonces for CSRF protection.
- Shortcode Identification: The plugin likely uses a shortcode to render the login form, such as
[fpsm_login_form](inferred). - Strategy:
- Search the plugin code for
add_shortcodeto find the login/submission form shortcode. - Create a public page with this shortcode:
wp post create --post_type=page --post_status=publish --post_content='[SHORTCODE_NAME]'. - Navigate to the page.
- Extract the nonce and any other required hidden fields (like
fpsm_login_nonce) usingbrowser_eval. - JS Check: Look for
wp_localize_scriptcalls in the plugin source to see if a nonce is stored in a global JS object (e.g.,window.fpsm_vars?.nonce).
- Search the plugin code for
5. Exploitation Strategy
The goal is to trigger the verify_username_password function and provide an external URL in the requested_page parameter.
Request Details:
- Method: POST
- URL:
http://localhost:8080/(The root URL is usually sufficient if the function is hooked toinit) - Headers:
Content-Type: application/x-www-form-urlencoded - Body Parameters:
requested_page:https://vulnerable.com(Target of the redirect)fpsm_login_submit:1(Inferred: A parameter to trigger the login logic)nonce_field_name:[NONCE_VALUE](If discovered in step 4)
Example Payload:
POST / HTTP/1.1
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
fpsm_login_submit=1&requested_page=https://vulnerable.com&fpsm_login_nonce=abcdef1234
6. Test Data Setup
- Install Plugin: Ensure Frontend Post Submission Manager Lite <= 1.2.7 is installed and active.
- Create Form Page:
- Search plugin files for
add_shortcode. - Run:
wp post create --post_type=page --post_title="Login" --post_status=publish --post_content='[fpsm_login_form]'(Replace with actual shortcode).
- Search plugin files for
- Identify Trigger: Look at the HTML source of the created page to find the
nameattribute of the submit button and therequested_pagehidden input (if it exists).
7. Expected Results
- The server should respond with an HTTP 302 Found status code.
- The
Locationheader in the response must match the value provided in therequested_pageparameter (e.g.,Location: https://vulnerable.com). - The redirection should occur regardless of whether the "login" credentials (if any) are valid, provided the redirection logic is reached.
8. Verification Steps
- Analyze HTTP Response: Use the
http_requesttool and inspect theheadersproperty of the response object.- Check
response.status === 302. - Check
response.headers['location'] === 'https://vulnerable.com'.
- Check
- Manual Browser Check: Use
browser_navigateto the crafted URL and verify the browser actually lands on the external site.
9. Alternative Approaches
- Path Traversal/Absolute Path: If the plugin prepends the site URL, try bypasses like
//vulnerable.comorhttps://vulnerable.com. - Different Hooks: If
initdoesn't work, check if the plugin uses a specificadmin-post.phpaction or an AJAX action (wp_ajax_nopriv_...). - Empty Password/User: Some login handlers only redirect if the input is processed. Try providing a dummy username/password to reach the part of the code that handles
requested_page. - Query String: Check if the parameter is also accepted via GET:
http://localhost:8080/?requested_page=https://vulnerable.com.
Summary
The Frontend Post Submission Manager Lite plugin for WordPress is vulnerable to an unauthenticated open redirect due to insufficient validation of the 'requested_page' POST parameter in the 'verify_username_password' function. This allows attackers to redirect users to external, potentially malicious domains after a form submission.
Vulnerable Code
// In the function responsible for login verification // Likely hooked to init or wp_loaded function verify_username_password() { // ... (logic for processing user login/credentials) ... if ( isset( $_POST['requested_page'] ) ) { $redirect_url = $_POST['requested_page']; wp_redirect( $redirect_url ); exit; } }
Security Fix
@@ -1,4 +1,4 @@ - wp_redirect( $redirect_url ); + wp_safe_redirect( $redirect_url );
Exploit Outline
The exploit involves sending a crafted POST request to an endpoint where the 'verify_username_password' function is active (usually on every page load via the 'init' hook). The attacker provides an external URL in the 'requested_page' parameter along with the necessary trigger parameters (e.g., 'fpsm_login_submit') to simulate a login or form submission. Because the plugin uses 'wp_redirect' without validating the destination, the server responds with a 302 Found status, redirecting the victim to the attacker-specified URL.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.