Skip to main content

WordPress Click2Shell flaw lets hackers execute PHP on the server

0
Critical
Vulnerabilitywordpresscsrfphp
Published: 09/21/2026 (09/21/2026, 18:23:11 UTC)
Source: Bleeping Computer

Description

Click2Shell is a cross-site request forgery (CSRF) vulnerability in WordPress Core up to version 7.1.0 that allows unauthenticated attackers to execute arbitrary PHP code on the server by forcing the installation of a theme from the official WordPress.org catalog. The attack requires a logged-in administrator to visit a crafted URL, which triggers the execution of PHP code via an inactive theme during a Customizer preview. This vulnerability was fixed in WordPress version 7.1.1 by escaping the theme slug and restricting jQuery selectors. The flaw enables remote code execution that could lead to file manipulation, data access, and creation of rogue admin accounts.

Affected software

Affected versions
<=7.1.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/21/2026, 18:31:49 UTC

Technical Analysis

The Click2Shell vulnerability is a pre-authenticated remote code execution chain affecting WordPress Core versions up to 7.1.0. It exploits a CSRF flaw where a value from a theme-preview URL is interpreted twice—once by the WordPress.org Themes API and again by JavaScript in the administrator's browser—allowing an attacker to install any theme from the official catalog without explicit administrator action. Even inactive themes can execute PHP during a Customizer preview, enabling arbitrary PHP execution on the server. The attack requires a logged-in administrator to visit a maliciously crafted URL. The vulnerability was responsibly disclosed by security researcher Paulos Yibelo and fixed in WordPress 7.1.1 by escaping the theme slug in jQuery selectors and limiting selector scope to actual theme cards. Patchstack analysis confirms that only administrators can trigger the exploit, and mitigation includes disabling file modifications via the DISALLOW_FILE_MODS setting.

Potential Impact

Successful exploitation allows remote code execution on the WordPress server without attacker authentication, provided a logged-in administrator visits a crafted URL. This can lead to file modification and deletion, unauthorized access to sensitive files such as wp-config.php containing database credentials and authentication secrets, creation of rogue administrator accounts, and injection of malicious scripts. The vulnerability affects WordPress sites running version 7.1.0 and earlier, potentially compromising site integrity and confidentiality.

Mitigation Recommendations

An official fix is available in WordPress version 7.1.1, which should be applied promptly. For administrators unable to update immediately, enabling the DISALLOW_FILE_MODS setting prevents forced installation of themes or plugins, mitigating the attack vector. Since the vulnerability requires a logged-in administrator to visit a malicious link, educating administrators to avoid suspicious URLs and preventing phishing or cross-site scripting attacks can reduce risk. However, updating to the latest WordPress version remains the strongest mitigation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Classification
{"confidence":0.92,"severitySource":"heuristic","classifier":"rss-v2"}
Article Source
{"url":"https://www.bleepingcomputer.com/news/security/wordpress-click2shell-flaw-lets-hackers-execute-php-on-the-server/","fetched":true,"fetchedAt":"2026-09-21T18:31:40.663Z","wordCount":825}

Threat ID: 6ab1780c55bf5e2cf54cd061

Added to database: 09/21/2026, 18:31:40 UTC

Last enriched: 09/21/2026, 18:31:49 UTC

Last updated: 09/22/2026, 00:43:50 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses