Cloudflare WAF chặn phpAfterShell nghiêm trọng cho mọi khách hàng, kể cả gói FreeCloudflare WAF Blocks Critical phpAfterShell for All Customers, Including Free Plans
Mẹo: Dùng Microsoft Edge để nghe giọng đọc tiếng Việt tự nhiên hơn (HoaiMy, NamMinh).Tip: Use Microsoft Edge for more natural Vietnamese read-aloud voices (HoaiMy, NamMinh).

phpAfterShell là lỗ hổng nghiêm trọng trong trình xử lý phiên mặc định của PHP, có thể dẫn đến thực thi mã. Cloudflare WAF chặn lỗ hổng này cho mọi khách hàng, kể cả gói Free, đồng thời bổ sung quy tắc mới cho các lỗ hổng PHP khác được vá trong cùng bản phát hành.phpAfterShell is a critical flaw in PHP's default session handler that can lead to code execution. Cloudflare WAF blocks it for all customers, including Free plans, and adds new rules for other PHP flaws fixed in the same release.
phpAfterShell là lỗ hổng nghiêm trọng trong trình xử lý phiên mặc định của PHP và có thể dẫn tới thực thi mã — rủi ro buộc đội vận hành phải ưu tiên chặn khai thác ngay, thay vì để việc xử lý xuống cuối hàng chờ. Cloudflare cho biết WAF của hãng đã chặn lỗ hổng này cho mọi khách hàng, kể cả gói Free. Thông điệp cần mang về rất rõ: đây là lớp bảo vệ ở biên mạng dành cho toàn bộ khách hàng, không phải đặc quyền của riêng nhóm trả phí.
Thay đổi gì
Cloudflare WAF được bổ sung khả năng chặn phpAfterShell, đồng thời có thêm quy tắc mới cho các lỗ hổng PHP khác được vá trong cùng một bản phát hành. Đây không phải bản cập nhật xoay quanh một tên lỗ hổng duy nhất, mà là một đợt mở rộng quy tắc cho cả nhóm rủi ro PHP xuất hiện cùng thời điểm.
Cần phân biệt rõ hai lớp xử lý. Các lỗ hổng PHP được vá ở phía PHP, còn đóng góp của Cloudflare là thêm quy tắc WAF để chặn nỗ lực khai thác trên đường tới ứng dụng. Người dùng vì thế nhận được một lớp giảm thiểu ở biên mạng, tách biệt với việc tự sửa thành phần bị lỗi trên máy chủ gốc.
Phạm vi đáng chú ý nhất: mọi khách hàng, kể cả gói Free.
| Hạng mục | Nội dung được công bố |
|---|---|
| Lỗ hổng chính | phpAfterShell trong trình xử lý phiên mặc định của PHP |
| Nhóm đi kèm | Các lỗ hổng PHP khác được vá trong cùng bản phát hành |
| Phạm vi bảo vệ | Mọi khách hàng Cloudflare WAF, gồm cả gói Free |
Vì sao dev cần quan tâm
Yếu tố khiến phpAfterShell đáng lo nằm ở hai chữ “mặc định”. Trình xử lý phiên mặc định đi cùng cách PHP xử lý phiên thông thường, nên diện rà soát không thể thu hẹp vào những đội từng tùy biến sâu. Bất kỳ ứng dụng PHP nào dựa vào cơ chế phiên mặc định cũng phải tự đặt câu hỏi về mức độ phơi nhiễm của mình.
Hậu quả được nêu là thực thi mã. Nếu máy chủ bị khiến chạy mã ngoài ý muốn, sự cố không còn dừng ở một yêu cầu lỗi: ứng dụng, dữ liệu phiên và mọi tài nguyên mà tiến trình PHP có quyền chạm tới đều phải nằm trong diện đánh giá. Bài công bố không mô tả một vụ xâm nhập cụ thể, nhưng khả năng đó đã đủ để lỗ hổng này không thể bị xem như lỗi cấu hình thông thường.
Lớp chặn ở WAF vì thế có giá trị ở khoảng thời gian nhạy cảm nhất: khi đội kỹ thuật còn cần kiểm tra phiên bản, độ tương thích và kế hoạch nâng cấp trên máy chủ gốc. Nó giúp ứng dụng không phải phơi mình hoàn toàn trong lúc chờ xử lý ở origin.
Chi tiết cách hoạt động
Về vị trí, WAF đứng trên đường truyền trước khi yêu cầu tới máy chủ gốc. Các quy tắc được quản lý của Cloudflare đánh giá lưu lượng đến và chặn những nỗ lực khai thác phpAfterShell ngay ở lớp tường lửa, thay vì để yêu cầu đó đi tiếp tới trình xử lý phiên PHP đang có lỗ hổng.
Điểm khác biệt của quy tắc được quản lý là Cloudflare cập nhật tập quy tắc ở phía nhà cung cấp; khách hàng không phải tự viết chữ ký nhận diện riêng cho phpAfterShell trong đợt này. Điều đó giúp việc bảo vệ không phụ thuộc vào khả năng tự nghiên cứu dấu hiệu khai thác của từng đội vận hành.
Giới hạn thông tin cũng cần nói thẳng: bài công bố không nêu mã CVE, ID quy tắc, danh sách phiên bản PHP bị ảnh hưởng, payload mẫu hay chữ ký nhận diện chi tiết trong nội dung được cung cấp. Vì vậy, người đọc không thể dựa vào bài này để tự suy ra mọi biến thể khai thác, cũng không có mẫu cụ thể để tự kiểm chứng quy tắc.
WAF chặn đường khai thác qua Cloudflare; nó không biến một bản PHP chưa vá thành bản đã vá.
Cách dùng thử
Với khách hàng hiện tại, cách “dùng” tính năng này không bắt đầu bằng việc mua thêm: phpAfterShell nằm trong phạm vi bảo vệ dành cho mọi khách hàng Cloudflare WAF, bao gồm gói Free. Bài công bố không yêu cầu một tầng bảo vệ riêng chỉ dành cho lỗ hổng này.
Bài công bố cũng không trình bày quy trình dùng thử riêng, các bước bật thủ công hay mã quy tắc để người dùng tự tra cứu trong nội dung được cung cấp. Việc cần xác nhận trên thực tế là website có thật sự đang chạy qua Cloudflare WAF hay không — bởi phạm vi được công bố là khách hàng của Cloudflare, không phải mọi website dùng PHP trên Internet.
Với website chưa qua Cloudflare, nguồn chưa công bố các bước triển khai hay thời điểm cụ thể để bài viết này có thể hứa hẹn thay. Và với mọi website, lớp WAF nên đi cùng việc theo dõi bản vá PHP cho nhóm lỗ hổng trong cùng đợt phát hành, thay vì trở thành lý do trì hoãn nâng cấp vô thời hạn.
phpAfterShell is a critical vulnerability in PHP's default session handler and can lead to code execution — a risk that forces operations teams to prioritise blocking exploitation immediately rather than pushing the work to the back of the queue. Cloudflare says its WAF now blocks this vulnerability for every customer, including the Free plan. The takeaway is clear: this is edge-network protection for the entire customer base, not a privilege reserved for paying tiers alone.
What changed
Cloudflare WAF has gained the ability to block phpAfterShell, while also adding new rules for other PHP vulnerabilities patched in the same release. This is not an update revolving around a single vulnerability name, but a broader expansion of rules covering a group of PHP risks that appeared at the same time.
The two layers of handling need to be distinguished clearly. The PHP vulnerabilities are patched on the PHP side, while Cloudflare's contribution is to add WAF rules that block exploitation attempts on their way to the application. Users therefore receive a mitigation layer at the network edge, separate from fixing the flawed component themselves on the origin server.
The most notable scope: every customer, including the Free plan.
| Item | What was announced |
|---|---|
| Main vulnerability | phpAfterShell in PHP's default session handler |
| Accompanying group | Other PHP vulnerabilities patched in the same release |
| Protection scope | Every Cloudflare WAF customer, including the Free plan |
Why developers should care
What makes phpAfterShell concerning lies in the word “default”. The default session handler comes with PHP's ordinary way of handling sessions, so the scope of review cannot be narrowed to teams that have made deep customisations. Any PHP application relying on the default session mechanism must ask itself how exposed it is.
The stated consequence is code execution. If a server can be made to run unintended code, the incident no longer stops at a faulty request: the application, session data and every resource the PHP process is allowed to reach must all fall within the scope of assessment. The announcement does not describe a specific intrusion, but that possibility alone is enough to stop this vulnerability from being treated as an ordinary configuration error.
A blocking layer at the WAF therefore matters most during the most sensitive window: while the engineering team still needs to check versions, compatibility and an upgrade plan for the origin server. It helps keep the application from being fully exposed while work at the origin is still pending.
How it works in detail
In terms of position, the WAF sits on the traffic path before a request reaches the origin server. Cloudflare's managed rules evaluate incoming traffic and block attempts to exploit phpAfterShell at the firewall layer, instead of letting the request continue to the vulnerable PHP session handler.
The difference with managed rules is that Cloudflare updates the rule set on the provider side; customers do not have to write their own detection signature for phpAfterShell in this round. That means protection does not depend on each operations team researching exploitation indicators by itself.
The limits of the disclosure also need to be stated plainly: in the content provided, the announcement does not give a CVE identifier, a rule ID, a list of affected PHP versions, a sample payload or detailed detection signatures. Readers therefore cannot use this article to infer every exploitation variant, and there is no concrete sample with which to verify the rule themselves.
The WAF blocks the exploitation path through Cloudflare; it does not turn an unpatched PHP installation into a patched one.
How to try it
For existing customers, “using” this feature does not start with buying more: phpAfterShell falls within the protection provided to every Cloudflare WAF customer, including the Free plan. The announcement does not require a separate protection tier dedicated solely to this vulnerability.
The announcement also does not present a separate trial process, manual activation steps or a rule identifier for users to look up in the content provided. What needs to be confirmed in practice is whether a website is actually running through Cloudflare WAF — because the announced scope is Cloudflare customers, not every PHP website on the Internet.
For websites not yet behind Cloudflare, the source has not published implementation steps or a specific timeline that this article could promise on its behalf. And for every website, the WAF layer should accompany tracking of PHP patches for the group of vulnerabilities in the same release, rather than becoming a reason to postpone upgrades indefinitely.
Nguồn tham chiếuSource: Cloudflare Blog


