MS-ISAC NOTICE NUMBER:
2024-106
ISSUE DATE(S):
09/27/2024
PREVIEW:
Several vulnerabilities have been discovered in PHP, the most serious of which could allow remote code execution. PHP is a programming language originally designed for use in web applications with HTML content. Successful exploitation could enable 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, modify or delete data; or create new accounts with full user rights. Service accounts configured to have fewer user rights on the system might be less affected than those operating 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
Small government
Companies:
Large and medium business entities
Small business entities
TECHNICAL SUMMARY:
Several vulnerabilities have been discovered in PHP, the most serious of which could allow remote code execution. The details of the vulnerabilities are as follows:
Tactical: Execution (TA0041):
Technical: Command and script interpreter (T1059)
- OS Command Injection: This vulnerability allows a remote attacker to send a crafted HTTP request to the application and execute arbitrary OS commands on the system due to a validation of Incorrect entry in PHP-CGI implementation. (CVE-2024-8926)
- Security Feature Bypass: The vulnerability allows a remote attacker to bypass implemented security restrictions and gain unauthorized access to the application due to environment variable collision, which may lead to to bypass cgi.force_redirect. (CVE-2024-8927)
- Insufficient logging: This vulnerability allows an attacker to modify the logs of child processes due to an unspecified error. (CVE-2024-9026)
- Input Validation Error: Vulnerability allows a remote attacker to pass specially crafted input to the application and bypass implemented security restrictions due to insufficient validation of user-provided input when parsing data from a multi-part form. (CVE-2024-8925)
RECOMMENDATIONS:
We recommend that the following actions be taken:
- Apply appropriate patches provided by PHP to vulnerable systems immediately after appropriate testing. (M1051: Update software)
- Backup 7.1: Establish and maintain a vulnerability management process: Establish and maintain a documented vulnerability management process for company assets. Review and update documentation annually or when significant changes within the business occur that could impact this protection.
- Backup 7.4: Perform automated application patch management: Perform application updates on enterprise assets with automated patch management on a monthly or more frequent basis.
- Backup 7.5: Perform automated vulnerability scans of internal company assets: Perform automated vulnerability scans of internal company assets on a quarterly or more frequent basis. Perform 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 content)
- Backup 2.3: Address unauthorized software: Ensure unauthorized software is removed from use on company assets or given a documented exception. Review monthly or more frequently.
- Backup 2.7: Authorized list of 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 run. Block the execution of unauthorized scripts. Reassess every two years or more frequently.
- Backup 9.3: Maintain and apply network-based URL filters: Apply and update network-based URL filters to prevent a business asset from connecting to potentially malicious or untrusted websites. Example implementations include category-based filtering, reputation-based filtering, or the use of blocklists. Apply filters for all company assets.
- Backup 9.6: Block unnecessary file types: Block unnecessary file types that attempt to access the company's email gateway.
- Apply the principle of least privilege to all systems and services. Run all software as an unprivileged user (without administrative privileges) to lessen the effects of a successful attack. (M1026: Privileged account management)
- Backup 4.7: Manage default accounts on company assets and software: Manage default accounts on company assets and software, such as root, administrator, and other preconfigured vendor accounts. Example implementations may include: disabling default accounts or rendering them unusable.
- Backup 5.4: Restrict administrator privileges to dedicated administrator accounts: Limit administrator privileges to dedicated administrator accounts on company assets. Conduct general computing activities, such as browsing the Internet, emailing, and using the Productivity Suite, from the user's primary, non-privileged account.
- Block code execution on a system through application control and/or script blocking. (M1038: Execution Prevention)
- Backup 2.5: Authorized list of authorized software: Use technical controls, such as application whitelisting, to ensure that only authorized software can run or be accessed. Reassess it every two years or more frequently.
- Backup 2.6: Allowed list of allowed libraries: Use technical controls to ensure that only authorized software libraries, such as specific .dll, .ocx, .so, etc. files, are allowed to load into a system process. Prevent unauthorized libraries from loading into a system process. Reassess every two years or more frequently.
- Backup 2.7: Authorized list of 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 run. Block the execution of unauthorized scripts. Reassess every two years or more frequently.
- Remove or deny access to unnecessary and potentially vulnerable software to prevent abuse by adversaries. (Mitigation M1042: Disable or remove a feature or program)
- Backup 2.3: Address unauthorized software: Ensure unauthorized software is removed from use on company assets or given a documented exception. Review monthly or more frequently.
- Backup 2.5: Authorized list of authorized software: Use technical controls, such as application whitelisting, to ensure that only authorized software can run or be accessed. Reassess every two years or more frequently.
- Backup 2.7: Authorized list of 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 run. Block the execution of unauthorized scripts. Reassess every two years or more frequently.
- Backup 4.1: Establish and maintain a secure configuration process: Establish and maintain a secure configuration process for company assets (end user devices, including wearable and mobile, non-IT/IoT devices and servers) and software (operating systems and applications). Review and update documentation annually or when significant changes within the business occur that could impact this protection.
- Backup 4.8: Uninstall or disable unnecessary services on company assets and software: Uninstall or disable unnecessary services on company assets and software, such as an unused file sharing service, web application module, or service feature.
- Backup 18.3: Fix penetration test results: Remediate penetration test results based on company policy on scope and prioritization of corrective actions.
- Backup 18.5: Perform periodic internal penetration testing: Perform periodic internal penetration testing based on program requirements, at least annually. The test can be carried out in a transparent box or an opaque box.