WordPress Comment2Shell Flaw Exposes Sites to Remote Code Execution
A critical WordPress vulnerability allowed anonymous users to execute server-side code via comments. Administrators are urged to update immediately.
TL;DR
- Anonymous comment XSS could escalate to RCE through admin session hijacking.
- Vulnerability tracked as CVE-2026-93485 and named 'Comment2Shell'.
- Fixed in WordPress version 7.1.1 released September 17.
- Attack required admin to view infected page after malicious comment.
- Site owners should patch immediately to prevent exploitation.
A newly discovered vulnerability in WordPress core poses a serious threat to website security by enabling unauthenticated attackers to achieve remote code execution. Dubbed "Comment2Shell" and tracked as CVE-2026-93485, the flaw allows anonymous visitors to inject malicious scripts into comment fields that can later execute commands on the server.
The attack scenario relies on social engineering and privilege escalation. An attacker first plants a hidden script within a comment on a vulnerable WordPress site. When an authenticated administrator subsequently views the infected page, the script executes in their browser context and potentially triggers server-side code execution. This chain of events transforms a seemingly harmless public comment into full system compromise.
WordPress addressed the issue in version 7.1.1, which was released on September 17. Site administrators are strongly encouraged to update immediately, especially given the ease with which this vulnerability can be exploited without requiring any user credentials or sophisticated techniques.
Technical Impact and Exploitation Path
- Unauthenticated attackers could inject persistent cross-site scripting payloads via comment forms.
- Successful exploitation required administrative user to access the compromised page while logged in.
- Malicious JavaScript could leverage admin privileges to perform actions like plugin installation or file manipulation.
- Server-side code execution was possible through crafted requests initiated by compromised admin sessions.
- No authentication or special permissions were needed to submit the initial malicious comment.
Mitigation and Response Recommendations
- Upgrade WordPress installations to version 7.1.1 or newer immediately.
- Audit existing comments for suspicious content before applying patches.
- Implement strict content security policies to limit script execution from comments.
- Monitor server logs for unusual activity following potential exploitation windows.
- Consider temporary comment moderation until all instances are confirmed patched.
Sources
Sources
Security email updates
One digest email when we publish new security articles (TL;DR plus links to read more). Unsubscribe anytime from the message footer. See our Privacy Policy.