Home CIS Advisories Multiple Vulnerabilities in PHP Could Allow for Remote Code Execution Multiple Vulnerabilities in PHP Could Allow for Remote Code Execution MS-ISAC ADVISORY NUMBER: 2024-106 DATE(S) ISSUED: 09/27/2024 OVERVIEW: Multiple vulnerabilities have been discovered in PHP, the most severe of which could allow for remote code execution. PHP is a programming language originally designed for use in web-based applications with HTML content. Successful exploitation could allow for remote code execution in the context of the affected service account. Depending on the privileges associated with the service account an attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Service accounts that are configured to have fewer user rights on the system could be less impacted than those who operate with administrative user rights. THREAT INTELLIGENCE: There are currently no reports of these vulnerabilities being exploited in the wild. SYSTEMS AFFECTED: PHP 8.1 versions prior to 8.1.30 PHP 8.2 versions prior to 8.2.24 PHP 8.3 versions prior to 8.3.12 RISK: Government: Large and medium government entities HIGH Small government MEDIUM Businesses: Large and medium business entities HIGH Small business entities MEDIUM Home Users: LOW TECHNICAL SUMMARY: Multiple vulnerabilities have been discovered in PHP, the most severe of which could allow for remote code execution. Details of the vulnerabilities are as follows: Tactic: Execution ( TA0041 ): Technique: Command and Scripting Interpreter ( T1059 ) OS Command Injection: The vulnerability allows a remote attacker to send specially crafted HTTP request to the application and execute arbitrary OS commands on the system due to improper input validation in PHP-CGI implementation. (CVE-2024-8926) Security features bypass: The vulnerability allows a remote attacker to bypass implemented security restriction and gain unauthorized access to the application due to environment variable collision, which can lead to cgi.force_redirect bypass. (CVE-2024-8927) Insufficient Logging: The vulnerability allows an attacker to alter logs from child processes due to an unspecified error. (CVE-2024-9026) Input validation error: The vulnerability allows a remote attacker to pass specially crafted input to the application and bypass implemented security restrictions due to insufficient validation of user-supplied input when parsing multipart form data. (CVE-2024-8925) RECOMMENDATIONS: We recommend the following actions be taken: Apply appropriate patches provided by PHP to vulnerable systems immediately after appropriate testing. ( M1051 : Update Software ) Safeguard 7.1: Establish and Maintain a Vulnerability Management Process : Establish and maintain a documented vulnerability management process for enterprise assets. Review and update documentation annually, or when significant enterprise changes occur that could impact this Safeguard. Safeguard 7.4: Perform Automated Application Patch Management: Perform application updates on enterprise assets through automated patch management on a monthly, or more frequent, basis. Safeguard 7.5: Perform Automated Vulnerability Scans of Internal Enterprise Assets: Perform automated vulnerability scans of internal enterprise assets on a quarterly, or more frequent, basis. Conduct both authenticated and unauthenticated scans, using a SCAP-compliant vulnerability scanning tool. Restrict use of certain websites, block downloads/attachments, block Javascript, restrict browser extensions, etc. ( M1021 : Restrict Web-Based Content ) Safeguard 2.3: Address Unauthorized Software: Ensure that unauthorized software is either removed from use on enterprise assets or receives a documented exception. Review monthly, or more frequently. Safeguard 2.7: Allowlist Authorized Scripts: Use technical controls, such as digital signatures and version control, to ensure that only authorized scripts, such as specific .ps1, .py, etc., files, are allowed to execute. Block unauthorized scripts from executing. Reassessbi-annually, or more frequently. Safeguard 9.3: Maintain and Enforce Network-Based URL Filters: Enforce and update network-based URL filters to limit an enterprise asset from connecting to potentially malicious or unapproved websites. Example implementations include category-based filtering, reputation-based filtering, or through the use of block lists. Enforce filters for all enterprise assets. · Safeguard 9.6: Block Unnecessary File Types: Block unnecessary file types attempting to enter the enterprise’s email gateway. Apply the Principle of Least Privilege to all systems and services. Run all software as a non-privileged user (one without administrative privileges) to diminish the effects of a successful attack. ( M1026 : Privileged Account Management ) Safeguard 4.7: Manage Default Accounts on Enterprise Assets and Software: Manage default accounts on enterprise assets and software, such as root, admini
Multiple vulnerabilities have been discovered in PHP, the most severe of which is an OS command injection flaw (