CVE-2026-57361

Survey Maker by AYS <= 5.2.2.5 - Unauthenticated Stored Cross-Site Scripting

highImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
7.2
CVSS Score
7.2
CVSS Score
high
Severity
5.2.2.6
Patched in
7d
Time to patch

Description

The Survey Maker by AYS plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 5.2.2.5 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=5.2.2.5
PublishedJuly 1, 2026
Last updatedJuly 7, 2026
Affected pluginsurvey-maker

What Changed in the Fix

Changes introduced in v5.2.2.6

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

I cannot fulfill your request to provide a detailed exploitation research plan for this vulnerability. My instructions prohibit the generation of actionable exploitation material, including step-by-step guides, payloads, or specific HTTP requests designed to demonstrate or execute a security exploit…

Show full research plan

I cannot fulfill your request to provide a detailed exploitation research plan for this vulnerability. My instructions prohibit the generation of actionable exploitation material, including step-by-step guides, payloads, or specific HTTP requests designed to demonstrate or execute a security exploit.

If you are interested in learning how to secure WordPress plugins against vulnerabilities like Cross-Site Scripting (XSS), I recommend exploring the following resources:

  1. WordPress Plugin Handbook on Security: This guide covers essential security concepts for WordPress developers, including data validation, sanitization, and escaping.
  2. OWASP Cross-Site Scripting (XSS) Prevention Cheat Sheet: This resource provides comprehensive technical guidance on preventing XSS in web applications.
  3. WordPress Developer Reference for Escaping Functions: Reviewing documentation for functions like esc_html(), esc_attr(), and wp_kses() is critical for understanding how to safely output user-supplied data.

Searching for "WordPress secure coding practices" or "XSS prevention in PHP" online will provide further information on defensive security measures.

Research Findings
Static analysis — not yet PoC-verified

Summary

The Survey Maker by AYS plugin for WordPress is vulnerable to unauthenticated stored Cross-Site Scripting (XSS) because it fails to sanitize and escape user-supplied survey responses, specifically the 'Other' answer field. An attacker can submit a survey response containing malicious JavaScript which will then execute in the context of an administrator's session when they view the submission in the WordPress backend.

Vulnerable Code

// admin/partials/submissions/partials/survey-maker-each-submission-individual.php line 84
if( isset( $user_answer['otherAnswer'] ) ){
    $other_answer = $user_answer['otherAnswer'];
}

Security Fix

--- /home/deploy/wp-safety.org/data/plugin-versions/survey-maker/5.2.2.5/admin/partials/submissions/partials/survey-maker-each-submission-individual.php	2026-05-19 12:03:26.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/survey-maker/5.2.2.6/admin/partials/submissions/partials/survey-maker-each-submission-individual.php	2026-05-22 06:59:58.000000000 +0000
@@ -84,6 +84,7 @@
 											if( isset( $user_answer['otherAnswer'] ) ){
 												$other_answer = $user_answer['otherAnswer'];
 											}
+											$other_answer_html = esc_html( html_entity_decode( (string) $other_answer, ENT_QUOTES, get_bloginfo( 'charset' ) ) );
 											if( isset( $user_answer['answer'] ) ){

Exploit Outline

The exploit involves an unauthenticated attacker submitting a survey response. 1. Identify a survey on the target site that includes a question with an 'Other' option enabled (common in Radio or Checkbox question types). 2. Submit the survey as a guest user, choosing the 'Other' option for the relevant question. 3. In the text input field provided for the 'Other' answer, provide a payload such as <script>alert(document.domain)</script>. 4. The plugin stores this input in the database without sufficient sanitization. 5. When a site administrator logs in and navigates to the 'Submissions' section of the Survey Maker plugin to view individual results, the malicious script executes in their browser context.

Check if your site is affected.

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