Detect PHP2Shell Vulnerability
Purpose
This solution detects PHP2Shell vulnerabilities (CVE-2026-109618 and CVE-2026-109619) across PHP installations on Windows devices managed through Kaseya VSA. It reports the number of installations that are vulnerable, end-of-life, or have an unknown status. Optionally, vulnerable standalone PHP installations can be updated to the latest patched release of their respective branches.
Associated Content
Custom Field
| Content | Type | Function |
|---|---|---|
| cPVAL PHP2Shell Vuln Count | Custom Field | Stores the count of PHP installations that are not confirmed as patched, helping technicians identify devices that require investigation or remediation. |
Automation
| Content | Type | Function |
|---|---|---|
| Detect PHP2Shell Vulnerability | Agent Procedure | Executes the detection script through Kaseya VSA, captures the vulnerability count, and updates the associated Custom Field. |
Implementation
Step 1: Create the following Custom Field
Create the Custom Field in Kaseya VSA:
Step 2: Import the Automation Script
Import the following automation script:
Step 3: Configure the Agent Procedure
Import or configure the following Agent Procedure:
Ensure the procedure executes the script and writes the resulting vulnerability count to the cPVAL PHP2Shell Vuln Count Custom Field.
Step 4: Run and Review the Results
Run the Agent Procedure on the required Windows devices. The Custom Field records the number of PHP installations whose status is not Patched, including Vulnerable, EndOfLife, and Unknown.
Detailed findings are saved locally to:
C:\ProgramData\_Automation\Script\Detect-PHP2ShellVulnerability\VulnerablePHP.txt
Technicians can review this file to identify the affected PHP installations.
Step 5: Optional Remediation
Enable the FixLocalInstall parameter to update vulnerable standalone PHP installations to the latest patched release of their respective branches. IIS is restarted if it uses an updated PHP installation.
The script requires administrative privileges and is designed to run as SYSTEM through Kaseya VSA.
FAQ
Q: Which vulnerabilities does this solution detect?
A: It checks for PHP2Shell vulnerabilities CVE-2026-109618 and CVE-2026-109619.
Q: Does the solution automatically update vulnerable PHP installations?
A: No. Updates are optional and require enabling the
FixLocalInstallparameter.
Q: What does the Custom Field value represent?
A: It represents the number of PHP installations that are not confirmed as patched. This includes installations reported as
Vulnerable,EndOfLife, orUnknown.
Q: Where can technicians find the detailed vulnerability results?
A: Review the
VulnerablePHP.txtfile in the script's working directory (C:\ProgramData\_Automation\Script\Detect-PHP2ShellVulnerability\VulnerablePHP.txt) on the target device.
Q: Can remediation restart IIS?
A: Yes. IIS is restarted when it uses a PHP installation that the script updates.
Q: Does a Custom Field value of 0 mean all PHP installations are patched?
A: It means no installations were counted as
Vulnerable,EndOfLife, orUnknownduring that execution.
Changelog
2026-10-29
- Initial version of the documentation for PHP2Shell vulnerability detection and optional remediation through Kaseya VSA.