Security / PHP
CVE-2024-4577: with PHP, configuration matters too
A historical PHP-CGI bug on Windows shows why the PHP version number alone is not enough. What should a check of the server environment include?
A report of a PHP bug does not mean that every PHP website is at risk in the same way. What matters is the operating system, the execution mode, the configuration and the status of security fixes.
What CVE-2024-4577 describes
The 2024 vulnerability concerns affected PHP-CGI deployments on Windows and the handling of arguments. With an affected configuration, it can allow remote execution of PHP code. It therefore cannot automatically be applied to every server with PHP or to any Linux deployment. In June 2024, CISA added it to the list of actively exploited vulnerabilities and also records its use in ransomware campaigns.
The historical fixed versions in the respective branches were 8.1.29, 8.2.20 and 8.3.8. These numbers are not a recommendation for a current deployment. Today, you need to verify the supported branch and all subsequent security fixes.
What an administrator needs to know about the environment
The inventory should include the operating system, how PHP is served, the specific websites and pools, the origin of packages and responsibility for updates. This information makes it possible to evaluate a new alert without panic and without downplaying it.
- Where does the production website run, and where does its test version run?
- Which PHP mode does each environment use?
- Who supplies the packages and any backported fixes?
- When were the last update and functional check carried out?
Responding to a security alert
First, verify whether the announcement applies to your deployment. Then set the priority based on the service's exposure, the sensitivity of the data and the conditions for exploitation. Make the change with a prepared backup and a subsequent check of the application. A record of the intervention will also help with the next incident.
If it turns out that the environment has long been unsupported, a one-off fix is not enough as a strategy. You need a modernisation plan and a person who will see it through.
A simple question for your supplier
Ask for an overview of the technologies used and how vulnerabilities are assessed. The very ability to answer will show whether you have the environment's management under control or are just hoping the next announcement will not concern you.
Sources and further reading
The links lead to the original announcements, reports and documentation the article is based on.