wp2shell: WordPress RCE Chain Now Exploited at Scale
Security researchers have observed a dramatic increase in exploitation activity targeting a critical WordPress vulnerability chain dubbed wp2shell, which enables unauthenticated remote code execution on vulnerable sites. The release of a public proof-of-concept exploit has triggered mass internet scanning, as threat actors attempt to compromise WordPress installations at scale before administrators can patch.
What Is wp2shell?
wp2shell refers to an exploit chain combining two critical WordPress vulnerabilities that, when used together, allow an unauthenticated attacker to achieve full server compromise — essentially going from zero access to a web shell in a single attack sequence.
The chain involves:
- Authentication bypass — bypassing WordPress authentication or exploiting a pre-auth flaw to gain elevated access
- Remote code execution — leveraging the elevated access to execute arbitrary PHP code on the server
The "wp2shell" name reflects the end goal: WordPress to shell — complete server control through the WordPress installation.
Vulnerability Details
| Component | Description |
|---|---|
| Vulnerability Type | Chained: Authentication Bypass + RCE |
| Authentication Required | None (unauthenticated) |
| Impact | Full server compromise, webshell upload, data theft |
| Public Exploit | Yes — proof-of-concept publicly available |
| Active Exploitation | Confirmed — mass scanning underway |
| WordPress Core or Plugin | Details indicate WordPress core and/or widely-used plugin(s) |
The availability of a public exploit dramatically accelerates the exploitation timeline. Once a working PoC is released, automated scanning tools incorporate the exploit within hours, and mass exploitation attempts begin across the entire internet within days.
How the Attack Works
1. Attacker scans internet for WordPress installations (via Shodan, Censys, or mass scanners)
2. Authentication bypass — attacker exploits flaw to gain admin-equivalent access
3. File write / code execution — abuses privileged access to write PHP webshell
4. Webshell access — attacker accesses uploaded shell via HTTP
5. Post-exploitation:
- Database credential extraction (wp-config.php)
- Defacement
- Malware injection (SEO spam, cryptomining, redirects)
- Data exfiltration
- Lateral movement to other sites on shared hosting
Post-Exploitation Scenarios
Attackers who successfully exploit this chain typically pursue one or more of these goals:
| Goal | Method |
|---|---|
| SEO spam | Inject hidden links to boost attacker-controlled sites |
| Phishing hosting | Use compromised site to host phishing pages |
| Cryptomining | Install browser-side or server-side miners |
| Ransomware staging | Use webshell as pivot for broader network attack |
| Data theft | Extract customer data, credentials, email lists |
| Botnet recruitment | Add server to DDoS or spam infrastructure |
Mass Scanning Context
When a public exploit drops for a widely-deployed platform like WordPress (used by 43% of all websites globally), the scanning response is immediate and massive:
- Automated scanners probe every internet-accessible WordPress instance
- Bot networks deploy the exploit across millions of URLs within hours
- Attack volume can exceed hundreds of thousands of exploitation attempts per hour across the internet
Shared hosting environments are particularly at risk — a successful exploitation on one site can pivot to other sites on the same server using file system access or database privilege escalation.
Immediate Steps for WordPress Administrators
1. Update WordPress Core Immediately
# Via WP-CLI
wp core update
# Verify version
wp core versionOr update through WordPress Admin → Dashboard → Updates.
2. Update All Plugins and Themes
If the vulnerability chain involves plugins, update everything:
# Update all plugins
wp plugin update --all
# Update all themes
wp theme update --all3. Scan for Existing Compromise
# Check for recently modified PHP files (last 7 days)
find /path/to/wordpress/ -name "*.php" -mtime -7 -type f
# Look for webshell indicators
grep -rl "eval\s*(base64_decode" /path/to/wordpress/
grep -rl "system\s*(" /path/to/wordpress/wp-content/uploads/
grep -rl "\$_REQUEST\[" /path/to/wordpress/wp-content/uploads/
# Verify WordPress core file integrity
wp core verify-checksums4. Review User Accounts
# List all WordPress admin accounts
wp user list --role=administrator
# Check for recently created users
wp user list --orderby=registered --order=DESC5. Deploy a WAF
A Web Application Firewall can block exploitation attempts even before patching:
- Wordfence (free and premium) — WordPress-specific WAF with virtual patching
- Cloudflare WAF — blocks common WordPress attack patterns at the edge
- Sucuri — website security platform with WAF and malware scanning
# Install Wordfence via WP-CLI
wp plugin install wordfence --activate6. Harden File Permissions
# Correct WordPress file permissions
find /path/to/wordpress/ -type f -exec chmod 644 {} \;
find /path/to/wordpress/ -type d -exec chmod 755 {} \;
# Restrict wp-config.php
chmod 600 /path/to/wordpress/wp-config.php
# Make uploads non-executable (prevent PHP webshell execution)
# Add to .htaccess in wp-content/uploads/:
# <FilesMatch "\.php$">
# deny from all
# </FilesMatch>Detection Indicators
| Indicator | Description |
|---|---|
Unexpected PHP files in /uploads/ | Webshells disguised as media files |
| New administrator accounts | Backdoor user accounts |
Modified wp-config.php | Credential harvesting or redirect injection |
| Outbound connections from web server | Data exfiltration or C2 communication |
| Unusual POST requests in access logs | Exploitation attempts or webshell invocations |
| Google Safe Browsing warnings | Site flagged for malware by Google |
Why WordPress Is a Persistent Target
WordPress's ubiquity makes it the highest-value target in web security:
- 43%+ of the web runs WordPress
- Thousands of third-party plugins create a vast attack surface
- Many installations are unmaintained or running outdated versions
- Shared hosting amplifies the blast radius of successful compromise
Public exploits for WordPress vulnerabilities routinely trigger some of the largest coordinated web scanning campaigns observed by security researchers.
References
- The Hacker News — WordPress wp2shell Exploitation Grows
- Wordfence Threat Intelligence
- WPScan WordPress Vulnerability Database