New wp2shell WordPress Core Flaw Lets Unauthenticated Attackers Run Code

A critical vulnerability has been discovered in WordPress core, allowing unauthenticated attackers to run arbitrary code on compromised sites. The flaw, identified as wp2shell, can be exploited without requiring any user credentials or authentication. This means that even if you have a secure password and up-to-date plugins, your site remains vulnerable to attack.

The vulnerability is particularly concerning because it allows attackers to gain high-level access to the WordPress environment, essentially giving them free rein to modify files, execute system commands, and potentially inject malware into the site’s core. This can lead to data breaches, website defacement, and even ransom demands from malicious actors who exploit the vulnerability.

Researchers have noted that the issue stems from a bug in WordPress’s handling of user input, specifically related to its internal PHP code. When an attacker submits specially crafted data through a vulnerable endpoint, the code fails to properly sanitize it, allowing malicious commands to be executed. The flaw is present in all versions of WordPress core, including the latest 5.x branch, making every single site with an active account potentially susceptible.

The good news is that WordPress has acted swiftly to address the issue by releasing a patch for the vulnerability. However, this highlights the need for continuous monitoring and timely updates to ensure sites remain secure. Given the automated nature of these attacks, AI-powered tools can be particularly effective in detecting vulnerabilities before they’re exploited, allowing administrators to stay one step ahead.

To mitigate the risk of similar attacks in the future, it’s essential for site owners to adopt a proactive approach to security. This includes regularly scanning plugins and themes for updates, enabling automatic WordPress core updates, and implementing web application firewalls (WAFs) to block suspicious traffic. Furthermore, adopting a robust backup strategy can help minimize data loss in case of an attack.

In the wake of this vulnerability, it’s clear that maintaining robust cybersecurity defenses is more crucial than ever. To do so effectively, site owners should prioritize continuous education on emerging threats and best practices for remediation.


Source: The Hacker News — 2026-07-17