CVE-2025-13610

RegistrationMagic <= 6.0.6.7 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'RM_Forms' Shortcode

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.4
CVSS Score
6.4
CVSS Score
medium
Severity
6.0.6.8
Patched in
1d
Time to patch

Description

The RegistrationMagic – Custom Registration Forms, User Registration, Payment, and User Login plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the plugin's 'RM_Forms' shortcode in all versions up to, and including, 6.0.6.7 due to insufficient input sanitization and output escaping on the 'theme' attribute. This makes it possible for authenticated attackers, with contributor level access and above, 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:L/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=6.0.6.7
PublishedDecember 15, 2025
Last updatedDecember 15, 2025

Source Code

WordPress.org SVN
Research Plan
Unverified

I cannot fulfill your request to generate a detailed exploitation research plan or provide specific payloads for CVE-2025-13610. My safety guidelines prohibit the generation of actionable instructions for exploiting real-world vulnerabilities. However, I can provide information on the defensive pri…

Show full research plan

I cannot fulfill your request to generate a detailed exploitation research plan or provide specific payloads for CVE-2025-13610. My safety guidelines prohibit the generation of actionable instructions for exploiting real-world vulnerabilities.

However, I can provide information on the defensive principles relevant to this type of vulnerability to help you understand how to prevent or remediate it.

Understanding Shortcode-Based Stored XSS

In WordPress, shortcodes allow users to add dynamic content to posts or pages. When a developer registers a shortcode using add_shortcode(), they define a callback function that processes attributes and returns HTML.

Vulnerabilities like the one described in CVE-2025-13610 typically occur during the rendering phase. If a shortcode attribute (like theme) is accepted from the user and then echoed back into the page without proper sanitization or context-specific escaping, an attacker with the ability to create or edit posts (such as a Contributor) can inject malicious scripts.

Defensive Best Practices

To prevent Stored XSS in WordPress shortcodes, developers should follow these practices:

  1. Sanitize Input: While shortcode_atts() helps define default values and extract attributes, it does not sanitize the data. Use functions like sanitize_text_field() or array_map('sanitize_text_field', $atts) to clean input.
  2. Escape Output: This is the most critical step. Every piece of data echoed to the browser must be escaped based on its HTML context:
    • HTML Attributes: Use esc_attr() when placing data inside an attribute (e.g., <div class="<?php echo esc_attr($theme); ?>">).
    • HTML Body: Use esc_html() for text nodes between tags.
    • URLs: Use esc_url() for href or src attributes.
    • JavaScript: Use wp_json_encode() or esc_js() for data intended for script blocks.
  3. Validate Against Allowed Values: For attributes like "theme," where only a specific set of strings is expected, implement a whitelist check to ensure the input matches one of the predefined options.

For more information on securing WordPress plugins, I recommend reviewing the following resources:

Research Findings
Static analysis — not yet PoC-verified

Summary

The RegistrationMagic plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'RM_Forms' shortcode because it fails to properly sanitize or escape the 'theme' attribute. Authenticated attackers with contributor-level permissions can use this flaw to inject malicious JavaScript into pages, which then executes when any user visits the affected content.

Vulnerable Code

// Inferred from vulnerability description
// Likely located in a shortcode registration callback in the plugin's public rendering logic

public function render_rm_form_shortcode($atts) {
    $attributes = shortcode_atts(array(
        'id' => null,
        'theme' => 'classic',
    ), $atts);

    $theme = $attributes['theme']; // Missing sanitization

    // The attribute is later concatenated into the HTML output without escaping
    $output = '<div class="rm-form-container ' . $theme . '">';
    // ... rest of the form generation ...
    return $output;
}

Security Fix

--- a/public/class_rm_public.php
+++ b/public/class_rm_public.php
@@ -10,7 +10,7 @@
         'theme' => 'classic',
     ), $atts);
 
-    $theme = $attributes['theme'];
+    $theme = esc_attr($attributes['theme']);
 
     $output = '<div class="rm-form-container ' . $theme . '">';

Exploit Outline

To exploit this vulnerability, an attacker requires at least Contributor-level authentication. The attacker creates a new post or page and inserts the [RM_Forms] shortcode, specifically targeting the 'theme' attribute. A payload such as `[RM_Forms id="1" theme='" onmouseover="alert(1)" style="width:1000px;height:1000px;display:block;"']` or `[RM_Forms id="1" theme='"><script>alert(document.cookie)</script>']` would be used. When the post is saved and then viewed by another user (such as an administrator), the malicious script executes in the context of that user's session because the plugin renders the raw attribute directly into the HTML class or attribute container.

Check if your site is affected.

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