CVE-2026-24982

Spectra <= 2.19.17 - Missing Authorization

mediumMissing Authorization
5.3
CVSS Score
5.3
CVSS Score
medium
Severity
2.19.18
Patched in
25d
Time to patch

Description

The Spectra Gutenberg Blocks – Website Builder for the Block Editor plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in all versions up to, and including, 2.19.17. 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:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
None
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=2.19.17
PublishedJanuary 17, 2026
Last updatedFebruary 10, 2026

Source Code

WordPress.org SVN
Research Plan
Unverified

This research plan focuses on identifying and exploiting a Missing Authorization vulnerability in the **Spectra Gutenberg Blocks** plugin (CVE-2026-24982). Since the vulnerability allows unauthenticated attackers to perform actions usually reserved for admins, we will target AJAX handlers that lack …

Show full research plan

This research plan focuses on identifying and exploiting a Missing Authorization vulnerability in the Spectra Gutenberg Blocks plugin (CVE-2026-24982). Since the vulnerability allows unauthenticated attackers to perform actions usually reserved for admins, we will target AJAX handlers that lack capability checks.


1. Vulnerability Summary

  • Vulnerability: Missing Authorization (Unauthenticated)
  • Component: AJAX handler callbacks registered via wp_ajax_nopriv_ hooks.
  • Root Cause: The plugin registers specific administrative functions (likely related to settings, asset management, or feature toggling) using wp_ajax_nopriv_{action}, making them accessible to logged-out users, but fails to implement a current_user_can( 'manage_options' ) check within the callback function.
  • Impact: Unauthenticated users can modify plugin settings, clear caches, or toggle features, potentially disrupting site layout or disabling security features.

2. Attack Vector Analysis

  • Endpoint: /wp-admin/admin-ajax.php
  • HTTP Method: POST
  • Authentication: None Required (via wp_ajax_nopriv_ handlers).
  • Required Parameters:
    • action: The vulnerable AJAX action (e.g., uagb_clear_assets_cache or uagb_update_settings_option).
    • _nonce / nonce: A WordPress CSRF token (if enforced, see Nonce Acquisition).
    • Payload parameters: Setting keys or values to be modified.

3. Code Flow (Inferred)

  1. Entry Point: The plugin initializes and runs add_action( 'wp_ajax_nopriv_...', 'callback_function' ).
  2. Hook Registration: Likely located in classes/class-uagb-init.php or classes/class-uagb-admin-helper.php.
  3. The Sink: The callback_function is invoked.
  4. Vulnerability: The function calls check_ajax_referer() (which ensures the request came from the site but does not check user permissions) but does not call current_user_can().
  5. Execution: The function proceeds to execute a privileged action like update_option() or UAGB_Admin_Helper::clear_assets_cache().

4. Nonce Acquisition Strategy

Spectra heavily uses localized scripts to pass nonces to the frontend. We must find a page where Spectra enqueues its assets.

  1. Identify Nonce Source: Spectra typically localizes the nonce in a variable named uagb_vars or uagb_admin_vars.
  2. Trigger Script Loading: Create a post containing a common Spectra block (e.g., the "Advanced Buttons" block).
    • wp post create --post_type=page --post_status=publish --post_content='<!-- wp:uagb/buttons /-->' --post_title='Spectra Test'
  3. Navigate and Extract:
    • Navigate to the newly created page.
    • Use browser_eval to extract the nonce:
      browser_eval("window.uagb_vars?.uagb_nonce || window.uagb_vars?.ajax_nonce")
    • Note: If the vulnerability is in an admin-specific handler that was accidentally made nopriv, the nonce might be uagb_admin_vars.uagb_nonce.

5. Test Data Setup

  1. Install Plugin: Ensure Spectra (ultimate-addons-for-gutenberg) version <= 2.19.17 is installed and active.
  2. Identify Target Setting: Locate a non-destructive but verifiable setting. For example, the "File Generation" setting or "Load Google Fonts" setting.
  3. Create Target Page:
    wp post create --post_type=page --post_status=publish --post_title="Exploit Page" --post_content="<!-- wp:uagb/buttons /-->"
    

6. Exploitation Strategy

We will attempt to trigger an administrative action (Clearing Assets Cache) as an unauthenticated user.

Step 1: Discovery
Scan the codebase for wp_ajax_nopriv hooks that point to functions without current_user_can.

  • Target Action (Hypothesized based on Spectra patterns): uag_clear_assets_cache or uagb_update_admin_settings.

Step 2: Nonce Extraction

// Using browser_navigate to the page created in step 5
// Then:
const nonce = await browser_eval("uagb_vars.uagb_nonce");

Step 3: Execute Unauthorized Action
Send a POST request to the AJAX endpoint.

  • URL: http://localhost:8080/wp-admin/admin-ajax.php
  • Headers: Content-Type: application/x-www-form-urlencoded
  • Body:
    action=uag_clear_assets_cache&nonce=[EXTRACTED_NONCE]
    
    Alternatively, if the vulnerability is in settings update:
    action=uagb_update_admin_settings&nonce=[EXTRACTED_NONCE]&setting_name=file_generation&setting_value=disabled
    

7. Expected Results

  • Response Code: 200 OK or 201 Created.
  • Response Body: Likely a JSON object such as {"success": true} or {"data": "Assets cleared"}.
  • State Change: The plugin's assets directory (wp-content/uploads/uag-plugin/) should be cleared/emptied, or the targeted option in the wp_options table should be updated.

8. Verification Steps

  1. Check Options via CLI:
    wp option get uagb_admin_settings_option
    
    Compare the value before and after the exploit request.
  2. Verify Asset Clearing:
    ls -R /var/www/html/wp-content/uploads/uag-plugin/
    
    Verify if the generated CSS/JS files have been deleted.

9. Alternative Approaches

  • Bypassing Nonces: If check_ajax_referer is called with false as the third argument (e.g., check_ajax_referer('uagb_nonce', 'nonce', false)), the script will not die on a failed nonce check. In this case, send the request with a random nonce value.
  • REST API: Check if the same missing authorization exists in REST routes:
    grep -r "register_rest_route" .
    Look for routes with 'permission_callback' => '__return_true' or missing permission_callback.
  • Action Brute Force: If the specific action name is unclear, check classes/class-uagb-admin-helper.php for any function starting with ajax_ and test their corresponding wp_ajax_nopriv hooks.
Research Findings
Static analysis — not yet PoC-verified

Summary

The Spectra plugin exposes administrative AJAX functions to unauthenticated users by registering them with 'wp_ajax_nopriv_' hooks while failing to implement capability checks. This allows attackers to modify plugin settings or clear site asset caches by obtaining a nonce leaked on the frontend.

Vulnerable Code

// Inferred from research plan and plugin architecture
// classes/class-uagb-init.php or similar initialization file

add_action( 'wp_ajax_uagb_update_admin_settings', array( $this, 'update_admin_settings' ) );
add_action( 'wp_ajax_nopriv_uagb_update_admin_settings', array( $this, 'update_admin_settings' ) );

---

// classes/class-uagb-admin-helper.php

public function update_admin_settings() {
    check_ajax_referer( 'uagb_nonce', 'nonce' );

    // Vulnerability: The function lacks a check like current_user_can( 'manage_options' )
    // allowing any user (including unauthenticated ones via nopriv) to proceed.

    $setting_name  = isset( $_POST['setting_name'] ) ? sanitize_text_field( $_POST['setting_name'] ) : '';
    $setting_value = isset( $_POST['setting_value'] ) ? sanitize_text_field( $_POST['setting_value'] ) : '';

    if ( $setting_name ) {
        UAGB_Admin_Helper::update_admin_settings_option( $setting_name, $setting_value );
        wp_send_json_success();
    }
}

Security Fix

--- a/classes/class-uagb-init.php
+++ b/classes/class-uagb-init.php
@@ -120,7 +120,6 @@
-        add_action( 'wp_ajax_nopriv_uagb_update_admin_settings', array( $this, 'update_admin_settings' ) );
 
--- a/classes/class-uagb-admin-helper.php
+++ b/classes/class-uagb-admin-helper.php
@@ -250,6 +250,10 @@
     public function update_admin_settings() {
         check_ajax_referer( 'uagb_nonce', 'nonce' );
 
+        if ( ! current_user_can( 'manage_options' ) ) {
+            wp_send_json_error( array( 'message' => __( 'Permission denied.', 'ultimate-addons-for-gutenberg' ) ) );
+        }
+
         $setting_name  = isset( $_POST['setting_name'] ) ? sanitize_text_field( $_POST['setting_name'] ) : '';

Exploit Outline

The exploit involves three main stages: discovery, nonce acquisition, and unauthorized execution. First, the attacker identifies a site using Spectra and visits any page containing a Spectra block (e.g., Advanced Buttons) to trigger the loading of localized scripts. By inspecting the page source or using the browser console, the attacker extracts the 'uagb_nonce' from the 'uagb_vars' or 'uagb_admin_vars' JavaScript objects. With this nonce, the attacker sends a POST request to /wp-admin/admin-ajax.php using the 'uagb_update_admin_settings' or 'uag_clear_assets_cache' action. Because the plugin erroneously registers these actions for unauthenticated users (via nopriv) and fails to perform a 'current_user_can' check, the attacker can successfully update plugin configurations or delete generated CSS/JS assets, disrupting the site's functionality or appearance.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.