A newly disclosed WordPress Core vulnerability chain, dubbed Click2Shell, allowed unauthenticated attackers to force a logged-in Administrator’s browser to silently install a malicious theme and ultimately achieve remote code execution (RCE) with a single malicious link click.
Security researchers at PWNAI discovered that WordPress’s theme-preview URL parameter is interpreted inconsistently by two different components.
The WordPress.org Themes API canonicalizes the theme parameter into a legitimate slug, while the browser-side JavaScript in wp-admin/js/theme.js preserves the raw, attacker-supplied string and injects it directly into a jQuery CSS selector.
Click2Shell WordPress Flaw
By crafting a value such as twentytwenty"]>*>*>*/*, an attacker could break out of the intended selector scope and cause WordPress’s own script to automatically trigger the genuine “Install” button with no admin interaction, no nonce theft, and no install_themes capability required from the attacker.
The victim’s authenticated session supplies everything. On its own, this forces installation of an official catalog theme without activating it. PWNAI then found that WordPress loads a theme’s functions.php during Customizer preview even while it remains inactive.
Combined with a separate, unrelated bug in the (then-current) Mobile Repair Zone 2.5.4 theme, an AJAX handler registered without nonce or capability checks that accepted an attacker-controlled plugin package URL, the chain escalated from forced installation to full server-side PHP execution.
The complete sequence: crafted link → forced theme install → Customizer loads inactive theme code → unprotected AJAX installer fetches attacker plugin → PHP executes under the web server account, effectively handing over the entire site.
WordPress patched the selector-injection flaw in changeset 63664, shipped in WordPress 7.1.1 on September 17, 2026, as part of a maintenance and security release covering 11 fixes.
The patch restricts matches to genuine div.theme elements and applies $.escapeSelector() to neutralize injected selector syntax.
WordPress credited the pwn.ai research team and paid its maximum bug bounty, though a CVE identifier had not been assigned at the time of disclosure.
Researchers rated the standalone forced-install primitive as High severity (CVSS 3.1: 7.1) and the full chained exploit as Critical (CVSS 3.1: 9.3, with user-interaction requirement lowering impact).
The issue affects all WordPress Core versions prior to 7.1.1. Given WordPress powers an estimated 43% of all websites, roughly 500 million sites, the flaw’s scope was significant, though exploitation depended on chaining with an additional theme-side vulnerability.
Site administrators should update immediately to WordPress 7.1.1 and audit installed themes, including inactive ones, for unauthenticated or improperly protected AJAX handlers, a class of bug the researchers found in over 40 third-party catalog themes during their investigation.
Join 16,000+ SOC teams using ANY.RUN to streamline threat investigations and reduce manual effort. Explore for your team