CVE-2026-6804

AI Chatbot & Workflow Automation by AIWU <= 1.4.12 - Missing Authorization to Unauthenticated Arbitrary Modification via 'publishTasks' and 'unpublishTasks' AJAX Actions

mediumMissing Authorization
5.3
CVSS Score
5.3
CVSS Score
medium
Severity
1.5.4
Patched in
1d
Time to patch

Description

The AI Chatbot & Workflow Automation by AIWU plugin for WordPress is vulnerable to authorization bypass in all versions up to, and including, 1.4.12. This is due to the plugin not properly verifying that a user is authorized to perform an action. This makes it possible for unauthenticated attackers to publish draft WordPress posts, exposing unpublished content, or unpublish live content, causing service disruption, by supplying arbitrary scenario IDs.

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<=1.4.12
PublishedJuly 10, 2026
Last updatedJuly 11, 2026

What Changed in the Fix

Changes introduced in v1.5.4

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

I cannot fulfill your request to produce a detailed, technical exploitation research plan or specific HTTP payloads for CVE-2026-6804. Providing actionable instructions for exploiting vulnerabilities in specific software, even for research or testing purposes, can facilitate unauthorized access and …

Show full research plan

I cannot fulfill your request to produce a detailed, technical exploitation research plan or specific HTTP payloads for CVE-2026-6804. Providing actionable instructions for exploiting vulnerabilities in specific software, even for research or testing purposes, can facilitate unauthorized access and real-world harm.

Instead, I can explain the mechanics of "Missing Authorization" vulnerabilities in the context of WordPress plugins and how developers can properly secure AJAX endpoints.

Understanding Missing Authorization in WordPress

A "Missing Authorization" vulnerability occurs when an application provides access to sensitive functionality or data without properly verifying the identity and permissions of the requester. In WordPress plugins, this often happens within AJAX handlers or REST API endpoints.

1. The Role of admin-ajax.php

WordPress uses admin-ajax.php to handle asynchronous requests. Plugins register these handlers using two hooks:

  • wp_ajax_{action}: Fires for authenticated (logged-in) users.
  • wp_ajax_nopriv_{action}: Fires for unauthenticated (logged-out) users.

If a developer uses the nopriv hook for a sensitive action—such as modifying post statuses or accessing internal task configurations—without implementing internal permission checks, any visitor to the site can trigger that action.

2. Authorization vs. Authentication

  • Authentication proves who a user is.
  • Authorization determines what they are allowed to do.

A vulnerability exists when a function assumes that because a user is "logged in" or because they provided a valid "nonce," they are authorized to perform any action. In WordPress, authorization is typically handled via Capabilities.

Defensive Remediation

To prevent authorization bypasses, developers should follow these security practices:

Implement Capability Checks

Every sensitive AJAX handler should check if the current user has the appropriate permissions before executing logic. This is done using the current_user_can() function.

add_action( 'wp_ajax_my_sensitive_action', 'handle_sensitive_action' );

function handle_sensitive_action() {
    // 1. Authorization: Check if the user has the necessary capability
    if ( ! current_user_can( 'edit_posts' ) ) {
        wp_send_json_error( 'Unauthorized', 403 );
    }

    // 2. Nonce Verification: Protect against CSRF
    check_ajax_referer( 'my_action_nonce', 'nonce' );

    // 3. Process the request
    // ...
}

Proper Use of Nonces

Nonces (Number Used Once) in WordPress are primarily CSRF (Cross-Site Request Forgery) protection, not an authorization mechanism. A valid nonce only proves that the request was likely intended by the user; it does not prove the user has the right to perform the action.

Avoid nopriv for Administrative Tasks

Functionality that modifies site data, configuration, or content status should generally not be exposed via wp_ajax_nopriv_ hooks unless there is a specific, well-secured use case (such as a public-facing form with its own strict validation and rate limiting).

Security Resources

For further information on securing WordPress plugins, I recommend consulting the following official resources:

Research Findings
Static analysis — not yet PoC-verified

Summary

The AI Chatbot & Workflow Automation by AIWU plugin for WordPress is vulnerable to unauthorized data modification due to a lack of capability checks and nonce validation on sensitive AJAX actions. Unauthenticated attackers can exploit this to publish draft posts (exposing private content) or unpublish live content (causing service disruption) by targeting the 'publishTasks' and 'unpublishTasks' actions with arbitrary task IDs.

Vulnerable Code

// classes/controller.php @ 1.4.21

	public function exec( $task = '' ) {
		if (method_exists($this, $task)) {
			$this->_task = $task;   //For multicontrollers module version - who know, maybe that's will be?))
			return $this->$task();
		}
		return null;
	}

    // ...

	public function getPermissions() {
		return array();
	}

	public function getNotNoncedMethods() {
		return array();
	}

	public function getFrontMethods() {
		return array();
	}

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/ai-copilot-content-generator/1.4.21/classes/controller.php /home/deploy/wp-safety.org/data/plugin-versions/ai-copilot-content-generator/1.5.4/classes/controller.php
--- /home/deploy/wp-safety.org/data/plugin-versions/ai-copilot-content-generator/1.4.21/classes/controller.php	2026-05-25 14:27:02.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/ai-copilot-content-generator/1.5.4/classes/controller.php	2026-06-22 20:55:48.000000000 +0000
@@ -110,25 +118,73 @@
 	 *
 	 * @return array
 	 */
-	public function getNotNoncedMethods() {
-		return array();
-	}
-	/**
-	 * Methods that do not require user rights control
-	 */
-	public function getFrontMethods() {
-		return array();
-	}
-	public function getModule() {
-		return WaicFrame::_()->getModule( $this->getCode() );
-	}
+	public function getNoncedMethods() {
+		return array();
+	}
+	public function allowNoprivAjax( $action ) {
+		return false;
+	}
+	protected function _getAdminAjaxCap() {
+		$cap = 'manage_options';
+		$adminMenu = WaicFrame::_()->getModule('adminmenu');
+		if ($adminMenu && method_exists($adminMenu, 'getMainCap')) {
+			$mainCap = $adminMenu->getMainCap();
+			if (!empty($mainCap)) {
+				$cap = $mainCap;
+			}
+		}
+		return $cap;
+	}
+	protected function _ajaxSecurityError( $message ) {
+		if (function_exists('status_header')) {
+			status_header(403);
+		}
+		$res = new WaicResponse();
+		$res->pushError($message);
+		return $res->ajaxExec(true);
+	}
+	protected function _checkAdminAjaxSecurity() {
+		if (false === check_ajax_referer('waic-nonce', 'waicNonce', false)) {
+			return $this->_ajaxSecurityError(esc_html__('Security check failed', 'ai-copilot-content-generator'));
+		}
+		if (!current_user_can($this->_getAdminAjaxCap())) {
+			return $this->_ajaxSecurityError(esc_html__('You have no permissions to view this page', 'ai-copilot-content-generator'));
+		}
+		return true;
+	}
+	public function getModule() {
+		return WaicFrame::_()->getModule( $this->getCode() );
+	}

Exploit Outline

The exploit involves sending a crafted POST or GET request to the WordPress AJAX endpoint (/wp-admin/admin-ajax.php). An unauthenticated attacker sets the 'action' parameter to either 'publishTasks' or 'unpublishTasks' (depending on the module, these actions may be prefixed or routed through the plugin's dispatcher using a 'pl' parameter). By providing a target 'id' or 'task_id' in the request, the attacker triggers the corresponding status change logic in the plugin's controller. Because the vulnerable versions lack both 'current_user_can' checks and nonce verification for these actions, the plugin processes the request regardless of the requester's authentication status, allowing the attacker to manipulate the visibility of site content.

Check if your site is affected.

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