/

CVE-2026-124216

Severity:

HIGH RISK

(7.2)

Stored XSS (CWE-79) in WordPress Orphans Plugin Comments

CVE-2026-124216

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Execution of attacker-controlled scripts in visitors' browsers

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Orphans plugin for WordPress has a stored cross-site scripting flaw in the comment parameter because input is not sufficiently sanitized and output is not properly escaped. An unauthenticated attacker may get script-bearing content published by first having a benign comment approved under the same name and email, then submitting a payload comment that WordPress auto-publishes.

Affected context

The issue affects the Orphans plugin for WordPress in versions up to and including 3.4.5. It arises in comment handling when submitted content is stored and later rendered without adequate sanitization and output escaping. The described approval behavior means exploitation depends on a benign comment being approved under the same name and email used for the subsequent payload comment.

Exploit preconditions

  • Attack surface: WordPress comments handled by the Orphans plugin
  • Required access: No authenticated account is described as necessary; the attacker must be able to submit comments
  • Trigger point: A visitor loads a page where the attacker's comment is rendered
  • Why exploitation is possible: After a benign comment is approved for a given name and email, WordPress may auto-publish a later comment with matching details, allowing the insufficiently sanitized and escaped content to be stored and displayed

Why this happens

The plugin does not adequately sanitize the comment parameter on input or escape it for the relevant output context. This is a CWE-79: Cross-Site Scripting flaw: attacker-controlled content is stored and later rendered in a way that can be interpreted as script by a browser. The comment approval behavior can allow the payload comment to be published without a separate moderation decision.

Potential impact

  • A visitor's browser may execute attacker-controlled scripts when loading an affected page.
  • Scripts may act with the privileges and context of the affected site visitor.
  • The issue could be used to present deceptive content or perform actions available to a targeted visitor.

General mitigation guidance

Defensive approaches focus on treating comment content as untrusted throughout its lifecycle.

  • Sanitize input according to the intended content policy and validate it against an explicit schema.
  • Escape output at the point of rendering, using context-appropriate escaping.
  • Apply secure-by-default moderation and publication rules to user-submitted content.
  • Minimize the privileges available to site accounts and processes that handle comments.
  • Avoid relying on comment identity or approval heuristics as a substitute for safe content handling.

How teams detect issues like this

  • Use static analysis to identify comment data flowing from request parameters to rendered output without context-appropriate escaping.
  • Review code paths for sanitization performed only at input time, missing output escaping, or inconsistent handling across display contexts.
  • Test moderation and auto-approval policies to confirm they cannot bypass content-safety controls.
  • Enforce code-review and CI policies that require safe rendering APIs for user-controlled content; automated review tools may help flag risky data flows.

Sources

SourceLink
github.comgithub.com/iworks/sierotki/releases/tag/3.4.6
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/sierotki/tags/3.4.5/includes/iworks/class-iworks-orphan.php#L266
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/sierotki/tags/3.4.5/includes/iworks/class-iworks-orphan.php#L484
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/sierotki/tags/3.4.5/includes/iworks/class-iworks-orphan.php#L502
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/sierotki/tags/3.4.5/includes/iworks/class-iworks-orphan.php#L572
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/sierotki/tags/3.4.5/wp-comments-post.php%20%28core%29
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/d313cb15-59f4-4483-ba4b-d2237fa33248?source=cve

Frequently asked

questions

The described attack uses WordPress comment submission and does not require direct access to the server. Exploitation depends on the comment approval sequence and a visitor loading a page containing the published payload.

The vulnerability description says unauthenticated attackers can submit the comments. The attacker still needs the benign comment approved under the name and email used for the payload comment.

Treat comment content as untrusted: apply appropriate input sanitization and context-specific output escaping, and ensure publication workflows do not bypass these safeguards.

Review user-controlled data flows from submission through storage to rendering, use safe output APIs, and include tests and policy checks for stored XSS and moderation bypasses.

Find out what's already
exploitable in your codebase.