This week, the cybersecurity landscape has faced one of the most significant security crises in modern times: php2shell. Since the language is used by about 70% of websites – carrying out dynamic page generation, managing the backend application logic, and dealing with database interactions on platforms such as WordPress, Drupal, and custom Laravel installations – hackers are able to run their own code on vulnerable servers by sending specially crafted requests, without needing to log in. Even though patches are available, many sites and applications went down October 21 to carry out emergency updates.
However, the incident has sparked a massive leap forward in edge-layer defence from an unexpected origin.
How Cloudflare reacted to php2shell
Is this a new internet hero?
On X, Matthew Prince, Cloudflare’s CEO, says the number of malicious exploitation attempts jumped from thousands of hits in the hours before the announcement to tens of thousands within forty-five minutes, then reached millions of automated attacks.
In order to deal with sophisticated threats for which incoming request headers alone are not sufficient to detect an intrusion, Cloudflare expanded its web application firewall (WAF) with full transaction detection, and the php2shell rules are the first managed protections to use it. It confirmed that protections had been deployed about nine hours before it was made public.
How does the new Cloudflare WAF work?
Standard firewalls only check the traffic going towards a server, but full transaction detection looks at both the incoming HTTP request and the server’s response. A suspicious request on its own might be harmless, but if the server’s reply suggests the exploit actually worked, Cloudflare can block that response before it reaches the attacker. Customers can also write their own response rules. For example, a rule can block the reply when an unauthenticated visitor requests an admin page and the server returns it anyway.
There’s a catch, though. Blocking the response doesn’t undo anything that already happened on the server, so if an attacker’s code has already run, the damage may be done.
A positive point for website administrators and small business owners dealing with all this confusion is that Cloudflare isn’t keeping the new protection behind a paywall. Full transaction detection and response rules are available on every plan, including free accounts, and the managed php2shell protection is switched on by default. Free users can also create up to three custom response rules of their own, though paying customers get access to more detailed detection data and, over time, a wider range of managed protections.
Although this newly installed layer of WAF protection is able to catch malicious traffic at the network edge, cybersecurity experts stress that edge filtering is only a temporary solution. It is strongly advised that web developers and server administrators get in direct contact with their hosting providers so that they can immediately update PHP itself and thus keep their applications safe from the next wave of automated threats.