Smart Forms <= 2.6.100 - Missing Authorization to Authenticated (Subscriber+) Campaign Data Exposure
Description
The Smart Forms plugin for WordPress is vulnerable to unauthorized access of data due to a missing capability check on the 'rednao_smart_forms_get_campaigns' AJAX action in all versions up to, and including, 2.6.100. This makes it possible for authenticated attackers, with Subscriber-level access and above, to retrieve donation campaign data including campaign IDs and names.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:NTechnical Details
<=2.6.100# Research Plan: CVE-2026-2022 Smart Forms Campaign Data Exposure ## 1. Vulnerability Summary The **Smart Forms** plugin for WordPress (up to version 2.6.99) contains a missing authorization vulnerability in its AJAX handling logic. Specifically, the action `rednao_smart_forms_get_campaigns` fails …
Show full research plan
Research Plan: CVE-2026-2022 Smart Forms Campaign Data Exposure
1. Vulnerability Summary
The Smart Forms plugin for WordPress (up to version 2.6.99) contains a missing authorization vulnerability in its AJAX handling logic. Specifically, the action rednao_smart_forms_get_campaigns fails to verify the capabilities of the requesting user. While the action is registered via wp_ajax_, which requires an authenticated session, it does not restrict access to administrative users. Consequently, any authenticated user, including those with the Subscriber role, can trigger this action to retrieve a list of donation campaigns, exposing internal campaign IDs and names.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Action:
rednao_smart_forms_get_campaigns - HTTP Method:
POST - Authentication: Required (Subscriber or higher)
- Parameters:
action:rednao_smart_forms_get_campaignssecurityornonce(inferred): Potential nonce check (see Section 4).
- Preconditions: At least one campaign must exist in the system for data to be returned.
3. Code Flow
- Registration: The plugin registers the AJAX handler (likely in an initialization class or a dedicated AJAX controller).
add_action( 'wp_ajax_rednao_smart_forms_get_campaigns', [ $instance, 'rednao_smart_forms_get_campaigns' ] );
- Entry Point: A
POSTrequest is sent toadmin-ajax.phpwithaction=rednao_smart_forms_get_campaigns. - Missing Check: The handler function (e.g.,
rednao_smart_forms_get_campaigns()) is executed. It typically performs a database query (likely against a custom table likewp_rednao_smart_forms_campaignsor via a specific class method). - Vulnerability: The function lacks a call to
current_user_can( 'manage_options' )or a similar capability check before fetching and echoing the campaign data. - Data Sink: The function returns a JSON array of objects containing campaign details to the requester.
4. Nonce Acquisition Strategy
The plugin likely uses a nonce to protect its AJAX actions. Based on standard RedNao plugin patterns:
- Identify Script Localization: Search for
wp_localize_scriptin the plugin source to find the object name. It is likely named something likern_smart_forms_dataorrednao_smart_forms_vars. - Shortcode Method: If the nonce is only loaded on specific pages, find a shortcode (e.g.,
[smart-form]) and create a page with it. - Admin Dashboard Method: Since this is a Subscriber+ vulnerability, the nonce may be available in the standard WordPress admin dashboard for all logged-in users if the plugin enqueues its scripts for all authenticated users.
Execution Steps for Agent:
- Navigate to the WordPress dashboard as a Subscriber.
- Run the following in
browser_eval:// Look for common RedNao nonce locations window.rn_smart_forms_data?.nonce || window.rednao_smart_forms_vars?.nonce || document.querySelector('input[name="security"]')?.value - If not found, search the plugin source for
wp_create_nonce('rednao_smart_forms_get_campaigns')or similar strings to identify the exact nonce action name.
5. Exploitation Strategy
- Login: Authenticate as a Subscriber-level user.
- Extract Nonce: Use the
browser_evaltool to extract the required nonce from the admin dashboard or a page where the plugin is active. - Perform Request: Use
http_requestto call the vulnerable AJAX action.
Request Details:
- URL:
http://<target>/wp-admin/admin-ajax.php - Method:
POST - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
action=rednao_smart_forms_get_campaigns&security=<NONCE_VALUE>
(Note: The parameter name for the nonce might besecurity,nonce, or_wpnonce. Verify this in the source code.)
6. Test Data Setup
To ensure a successful proof of concept, campaign data must exist:
- Create Campaign: Use WP-CLI or the plugin UI (as Admin) to create at least two donation campaigns.
- Example (Inferred SQL if UI is complex):
wp db query "INSERT INTO wp_rednao_smart_forms_campaigns (name, description) VALUES ('Spring Fundraiser 2024', 'Annual spring drive'), ('Emergency Relief', 'Disaster support');"
- Example (Inferred SQL if UI is complex):
- Create Subscriber:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password123
7. Expected Results
- Success: The server responds with
HTTP 200 OKand a JSON body containing an array of campaign objects.- Example Response:
[{"id":"1","name":"Spring Fundraiser 2024"},{"id":"2","name":"Emergency Relief"}]
- Example Response:
- Failure: The server responds with
HTTP 403 Forbiddenor a-1/0(standard WordPress AJAX error) if the nonce is wrong or if a capability check is actually present.
8. Verification Steps
- Manual Check: Compare the JSON output from the exploit against the list of campaigns visible in the Admin UI.
- Database Check: Verify the IDs and names match the database:
wp db query "SELECT id, name FROM wp_rednao_smart_forms_campaigns;"
9. Alternative Approaches
- Missing Nonce Check: If
wp_verify_nonceis also missing or uses the default action-1, the exploit may work without a valid specific nonce or even with an invalid one. - REST API: Check if the plugin registers a similar endpoint under
wp-json/. Vulnerabilities in RedNao plugins often span across both AJAX and REST interfaces. Search forregister_rest_route.
Summary
The Smart Forms plugin for WordPress is vulnerable to unauthorized data disclosure due to a missing authorization check in its AJAX handler for donation campaigns. This allows authenticated users with Subscriber-level permissions or higher to retrieve sensitive campaign metadata, including internal IDs and names, which should be restricted to administrators.
Vulnerable Code
// File: smart-forms/includes/ajax-logic.php (approximate) add_action( 'wp_ajax_rednao_smart_forms_get_campaigns', [ $this, 'rednao_smart_forms_get_campaigns' ] ); public function rednao_smart_forms_get_campaigns() { // Potential nonce check might exist here, but capability check is missing // check_ajax_referer('rednao_smart_forms_nonce', 'security'); global $wpdb; $table_name = $wpdb->prefix . 'rednao_smart_forms_campaigns'; $results = $wpdb->get_results("SELECT id, name FROM $table_name"); echo json_encode($results); wp_die(); }
Security Fix
@@ -1,4 +1,8 @@ public function rednao_smart_forms_get_campaigns() { + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( -1 ); + } + check_ajax_referer( 'rednao_smart_forms_nonce', 'security' ); global $wpdb;
Exploit Outline
The exploit targets the WordPress AJAX endpoint to leak campaign information. An attacker follows these steps: 1. Authenticate as a Subscriber-level user. 2. Access the WordPress dashboard or a page with a Smart Form to extract a valid nonce (likely associated with the 'security' or 'nonce' parameter) found in global JavaScript variables like 'rn_smart_forms_data'. 3. Send a POST request to /wp-admin/admin-ajax.php with the 'action' parameter set to 'rednao_smart_forms_get_campaigns' and the extracted 'security' nonce. 4. The server responds with a JSON array containing the names and IDs of all donation campaigns stored in the plugin's database tables.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.