How we protected WordPress sites from WP2Shell before it went public
WP2Shell was a critical vulnerability chain that could let an unauthenticated attacker take over a WordPress website. By the time its details went public in July 2026, every shared server in our infrastructure was already protected.
That didn’t happen by chance. Getting there required close coordination with the WordPress core security team and several rounds of testing. The hardest part was writing firewall rules that blocked attacks without breaking legitimate WordPress functionality. The simplest fix, blocking the vulnerable endpoint entirely, would have broken the block editor for every site.
Our Head of WordPress, Marco Chiesi, takes us behind the scenes of how we prepared and deployed protection against WP2Shell.
What is the WP2Shell vulnerability chain?
WP2Shell chained two flaws in WordPress core:
- A batch-route confusion flaw in the REST API (CVE-2026-63030).
- An SQL injection flaw in WP_Query (CVE-2026-60137).
Together, they allowed attackers to create an administrator account, log in, and upload a malicious plugin. Neither flaw required a vulnerable plugin or special configuration to exploit. Even a default WordPress installation was exposed, with no existing account or login required.
The severity scores show why looking at individual flaws doesn’t tell the whole story.
| Flaw | CVSS (WordPress) | CISA’s assessment |
| REST API batch-route confusion | 9.8 (Critical) | Used in real attacks |
| SQL injection | 5.9 (Medium) | Used in real attacks – if combined with the REST API flaw, could give attackers full control |
CVSS measures the severity of individual vulnerabilities on a scale of 0 to 10, but it doesn’t capture how flaws combine. For WordPress sites, factors such as authentication requirements, the number of affected installations, and active exploitation matter just as much.
Sites running WordPress 6.9 or 7.0 were exposed to the full chain, while sites running WordPress 6.8 were affected by only one of the two flaws. Versions before 6.8 weren’t affected.
Every patch is a race against attackers
WordPress enables automatic updates by default, helping websites receive critical security fixes without manual intervention. However, a global rollout still takes hours, and some websites don’t receive automatic updates at all.
At the same time, publishing a security patch can reveal how to exploit the vulnerability it fixes. By comparing the updated code with its previous version, attackers can identify what changed, pinpoint the vulnerability, and develop exploits targeting websites that haven’t updated yet.
The time-to-exploit window also keeps shrinking year by year, as Mandiant’s research shows:
- 2018–2019: 63 days
- 2020–early 2021: 44 days
- 2021–2022: 32 days
- 2023: 5 days
- 2025: around −7 days, meaning exploits often appeared before patches were even released (M-Trends 2026)

The researcher who discovered the WP2Shell vulnerability chain, Adam Kues of Searchlight Cyber, used an AI model to identify the chain in about 10 hours, incurring only about $25 in compute costs.
“[Finding a vulnerability like this] is within reach of practically everyone,” Marco says. “Today, with AI, the timelines have accelerated enormously.”
The layered protection that keeps WordPress sites safe
WordPress websites can still be protected at several layers. Marco compares it to an apartment building:
- A CDN firewall is the bouncer at the end of the street, stopping attacks before they reach the server.
- A hosting provider’s firewall is the doorman in the lobby, checking every request that arrives.
- The security update is the locksmith who fixes the broken lock for good.

The locksmith is the only permanent fix, but until it arrives, the doorman keeps the site safe. That’s our role as a hosting provider. Every request to a website on our shared hosting passes through our servers first, so we can inspect it and block attacks before they reach WordPress.
And because one firewall rule covers our entire shared hosting infrastructure, we can protect every website on it at once, without customers needing to do anything. For more, see how we keep our customers’ websites safe.
With WP2Shell, we deployed firewall rules while the details were still confidential, so websites were already protected when the patch was released.
How we got ahead of the WP2Shell public disclosure
Protecting websites before a vulnerability goes public requires coordination that mostly happens behind the scenes. It depends on confidentiality and trust.
The WordPress core security team shares only what a few companies need to prepare defenses, and keeps the group small on purpose: the more people who know about a vulnerability before the fix, the higher the risk of a leak. WP2Shell was no exception.

The collaboration culminated in WordPress 7.0.2, the security release that addressed WP2Shell on July 17, 2026. Hostinger was among seven companies acknowledged in the release announcement, alongside Altis, Automattic, Bluehost, Cloudflare, GoDaddy, and WP Engine.
Getting into that small group isn’t something a company can buy. “It’s a matter of trust,” Marco explains, “and of relationships with members of the community, built over years of contributing and going to WordCamps.”
Once we received the confidential notice, our team moved quickly to deploy effective protection across the shared hosting infrastructure. Here’s how the response unfolded:
| Timeline | What happened |
| Thursday, July 16 – Evening | The WordPress core security team shared the initial vulnerability information and the first firewall rule. Our team immediately started preparing protection. |
| Overnight into Friday | We tested the first rule on a single server, then began rolling it out. Working with the WordPress core security team, we refined the rules through several versions. |
| Friday, July 17 – Early afternoon | Protection was in place across every shared server, hours before public disclosure. |
| Friday, July 17 – Evening | While attending Hostinger’s Cowboy Extravaganza summer party in Lithuania, a handful of our team members continued coordinating with the WordPress core security team – in cowboy hats and boots. |
| Friday, July 17 – 18:45 UTC | WordPress released version 7.0.2 and publicly disclosed the vulnerability details. Automatic updates began rolling out to affected websites. |
| Saturday, July 18 | We followed up on websites that hadn’t been reached by the automatic update process. |
How we built and tested the firewall rules
Every rule risks blocking legitimate requests, and the WP2Shell rules took several rounds to get right.
Four firewall rule versions in about 22 hours
Between July 16 and 17, the firewall rules went through four versions. The first version, from the WordPress core security team, blocked malformed requests to the REST API batch endpoint, but only when accessed via the standard method.
Testing by hosts and researchers soon turned up other ways, and each new version closed more of them.
The second widened the rule’s coverage, the third split it into two rules with much stricter validation of the request path, and the fourth, shared just before the release, added protection against nested batch requests.
A problem specific to our stack
The exploit could be sent as a JSON request body, which our web application firewall (WAF) didn’t inspect at the time. Enabling that inspection surfaced a bug in a third-party component, which we reported to the vendor.
So we wrote our own rules that inspect the raw request body directly. When the final rule set arrived, one of its rules would have undone that workaround, so we kept our version and adopted the rest.
Not every part of our infrastructure could run the same rules. Where a firewall couldn’t apply the precise rules, we used broader measures instead: blocking the entire batch endpoint at the CDN level in front of our own WordPress sites, or disabling the vulnerable routes with a small code snippet.
Testing before every rollout
Each version was first deployed to one production server, then to three servers across different data centers. The team watched the logs for about an hour before scaling up.
Test scripts shared by other hosts and community contributors sent both attack payloads, which had to be blocked, and normal requests, which had to pass.
After the JSON workaround, for example, the suite reported 30 blocked attacks, 10 legitimate requests allowed, and 0 failures. From there, we rolled out data center by data center.
Three things justified moving quickly: the scope was narrow (a single REST endpoint), normal requests in the test suites kept passing, and the alternative was exposing millions of sites to unauthenticated remote code execution.
The WordPress core security team also held the release until hosts confirmed their firewall coverage, so the rules had to be live first.
The false positive we didn’t see coming
One rule went too far. To support our JSON workaround, we added a nested-batch rule of our own, not part of the WordPress team’s set. It turned out to block legitimate requests from WordPress’s block-based Widget Editor, which saves widgets through the same batch endpoint.
We had assumed the endpoint was rarely used in normal browsing, and we were partly wrong.
Customers reported that saving widgets failed, and the tickets reached engineering about three weeks after the incident. Support unblocked affected sites with per-site exceptions while the team fixed the rule. We kept the rules active everywhere else, because many sites were still running vulnerable versions.
Decisions beyond the rules
Two other choices shaped the response. We didn’t notify customers before the details were public, since an early warning could have tipped off attackers. WordPress.org chose to force updates for affected versions, accepting the risk that if an update broke something, it would break everywhere at once.
After the WP2Shell vulnerability chain became public
WordPress published the vulnerability details at 18:45 UTC on July 17. Attackers moved fast. Patchstack recorded the first attack attempts about 90 minutes after WordPress released 7.0.2. By July 19, VulnCheck had verified more than two dozen proof-of-concept exploits. On July 21, CISA added both vulnerabilities to its list of actively exploited vulnerabilities, and a fully working end-to-end exploit was published the next day.
Security vendors counted the attacks they blocked:
- Monarx recorded over 2 million blocked requests over the disclosure weekend.
- Imunify360 reported more than 29 million blocked attempts, peaking at over 9 million in a single day.
- CrowdSec counted more than 62,000 attacking IP addresses in a rolling 15-day window five weeks after disclosure.

For most Hostinger customers, though, nothing changed. Our firewall rules had been in place for hours before the first attacks arrived. As Marco puts it: “Most of our customers, like those of most other hosts, didn’t even notice anything, because everything had already been secured ahead of time.”
Protection didn’t end with the firewall deployment. In the following days, our team monitored the situation, diagnosed websites that hadn’t updated automatically, and helped bring them up to date.
We sent targeted notifications to customers whose WordPress versions weren’t automatically updated, briefed our Customer Success team, and updated our AI support assistant. This way, we made sure customers received clear, accurate answers when they asked for information about this vulnerability.
Between August and October 2026, the same coordination happened five more times as WordPress released more security patches – 7.0.3, 7.0.4, 7.1.1, 7.1.2, and 7.1.3. Each time, the WordPress core security team shared protective rules in advance, hosting providers deployed them, and the public patch followed.
Keeping WordPress sites secure is an ongoing, shared effort
For us, effective infrastructure security takes preparation, sound engineering judgment, and relationships built long before an incident happens.
But hosting providers aren’t the only ones with a role to play in keeping WordPress sites secure. Website owners can reduce their exposure by keeping automatic updates enabled, using additional firewall protection where needed, and watching for signs of compromise, such as unexpected administrator accounts or unfamiliar plugins.
Whoever discovers vulnerabilities should report them privately: WordPress core issues through the WordPress HackerOne program, and plugin issues to the plugin’s developer or the WordPress.org Plugins team.
Publishing vulnerability details before a fix is available hands attackers a head start on every site running the affected software. PHP2Shell, a pair of critical PHP vulnerabilities disclosed in October 2026, showed what that looks like. The CVE identifiers leaked on a public forum a day before the scheduled release, forcing the PHP team to rush out patches while proof-of-concept exploits were already circulating.
Marco says, “When security works, it doesn’t make the news.” There was no headline for the more than 4.5 million WordPress websites we host that weren’t hacked, and that’s exactly the standard we hold ourselves to.
The rules took hours to deploy. The trust that made early preparation possible took years to build. We’ll keep investing in both, so future WordPress security releases can go out just as quietly.
This article is based on Marco Chiesi's talk, "WP2Shell e gli eroi invisibili di WordPress" (WP2Shell and the invisible heroes of WordPress) at WordCamp Pisa 2026.