WordPress Click2Shell flaw lets hackers execute PHP on the server
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.
AI Analysis
Technical Summary
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.
WordPress Click2Shell flaw lets hackers execute PHP on the server
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
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.