Skip to main content
VulnerabilityPublished

PHP2Shell - quick mitigation pre-patch

Source Reddit Cybersecurity

0

Mentioned vulnerabilities

Severity
Medium

Rated by Threat Radar

Data as of 21 Oct 2026, 23:00 UTC

What to do

AI-suggested

A pre-patch mitigation is to disable session.upload_progress by setting session.upload_progress.enabled=Off in php.ini, .user.ini, or .htaccess and then reloading PHP-FPM or the web server. Additionally, network-layer mitigations such as tightening inspection or rate-limiting multipart/form-data POST requests at the edge (e.g., via WAF or reverse proxy) can reduce exposure. Users should upgrade to the patched PHP versions once available: 8.2.35, 8.3.36, 8.4.27, and 8.5.11. If upgrade is not immediately possible, disabling the vulnerable feature is effective and reversible.

Discussion

A use-after-free (UAF) vulnerability exists in PHP's session.upload_progress handler related to serialize-state cross-request handling. This vulnerability does not lead to remote code execution but can cause memory safety issues and arbitrary memory reads/writes. The vulnerability affects prefork-based PHP setups and is confirmed with a medium severity impact. A pre-patch mitigation is available by disabling session.upload_progress in PHP configuration. Official patches are expected in PHP versions 8.2.35, 8.3.36, 8.4.27, and 8.5.11.

r/cybersecurity (opens in a new tab)u/vjeuss0 points0 comments

I did not validate, and info is scarce, but if it works it should be simple to apply with simple admin skills:

> Apply the stopgap (best-intel, low-risk, reversible)

>

> In php.ini / .user.ini / .htaccess:

>session.upload_progress.enabled = Off

> Reload PHP-FPM or your web server. This closes both paths (session.c:3239).

Needless to say, update ASAP or aimply.take the server down umtil it's available.

References

Community reviews

Loading reviews…