PHP SECURITY
PHP2Shell patching for cPanel and Plesk servers
On a cPanel or Plesk server, patch through the supplier that owns each PHP runtime and verify every domain’s assigned handler. A panel update, a website PHP update and a restart can be separate tasks; your completion record must show which components each action covered.

Advisory details checked on 22 October 2026. Recheck the linked vendor advisories before applying a production change.
Start with three different layers
A hosting panel can manage the website runtime while also running its own administration software. The operating system may supply another PHP interpreter used by command-line tasks. Add alternative PHP packages, per-domain handlers or containers, and one server can contain several independent update targets. Treat “we updated the panel” as a description of an action, not automatic proof that each target was corrected.
| Layer | Example question | Evidence to retain |
|---|---|---|
| Control panel | Does the panel bundle an affected runtime? | Vendor advisory and installed panel/component update |
| Website PHP | Which package and handler serves each domain? | Per-domain mapping and fixed supplier build |
| Other execution paths | Do jobs or integrations use another interpreter? | Executable or image identity and update record |
This runbook assumes you are the authorised server administrator. A shared-hosting customer should ask the provider to perform server-level work. Do not bypass the panel’s package management because a command for another Linux distribution appeared in a search result. A supported update channel is part of the security evidence, not administrative decoration.
Build a domain-to-handler inventory before changing defaults
In cPanel & WHM, MultiPHP Manager exposes system and domain-level PHP settings. Its documentation distinguishes inherited defaults from explicit account settings; changing a global default does not necessarily change existing domains. It also notes that an active LiteSpeed installation uses lsphp. Record the actual handler assigned to each production site, subdomain and staging service rather than assuming the default applies everywhere.
For Plesk, collect the installed PHP handlers and the PHP selection for each relevant domain through supported panel or administrator tooling. Identify operating-system packages separately from Plesk-supplied ones. An unused old handler is still worth recording: decide whether to update it or remove it through the supported process so a later configuration change cannot reactivate a vulnerable runtime.
- List public domains and the business service each one supports.
- Record the package supplier, installed PHP build, handler and associated process service.
- Include scheduled tasks, custom integrations and administration components.
- Identify who can perform updates and who can test the application afterwards.
- Mark unassigned or unused runtimes for supported retirement rather than leaving an unexplained exception.
cPanel: keep EasyApache packages and the active handler aligned
Use the current EasyApache and WHM update workflow appropriate to the server’s supported operating system and package provider. Review available PHP package updates and the proposed transaction, then apply the vendor-supported security correction. Retain the package revisions and update output. If CloudLinux or another supported supplier owns the relevant alternative PHP build, obtain that supplier’s fix mapping instead of treating an EasyApache result as evidence for a different package family.
After installation, replace the processes that actually serve the sites. cPanel documents the following restart command for its Apache PHP-FPM service. Use it only when that is the identified serving method and when a controlled restart has been planned. It is not an instruction for shared-hosting customers and it does not stand in for LiteSpeed’s own runtime-management procedure.
/usr/local/cpanel/scripts/restartsrv_apache_php_fpm --hardMonitor the restart and verify every affected service returns successfully. Do not delete PHP-FPM temporary directories to force a refresh: cPanel warns that manually removing its PrivateTmp-created directories can cause application errors. If a site fails, inspect its relevant service and application logs before changing package origins, permissions or handler settings at random.
Plesk: include website handlers and the panel engine
Plesk’s PHP2Shell advisory checked on 22 October 2026 covers its PHP packages and the panel’s engine. The advisory identifies Plesk Obsidian 18.0.80 Update 11 and 18.0.81 Update 4 as corrected panel-engine releases. It also documents fixed website PHP packages and specific legacy build mappings. Reopen the current advisory before acting, since applicability depends on platform and release.
Follow the supported Plesk update procedure for the installed release and operating system. Confirm the panel-engine correction separately from the packages assigned to websites. Apply the appropriate PHP component updates, then verify domain assignments and active runtime state. Do not copy a Linux package command to a Windows Plesk server; the service and update mechanisms differ.
Where an older PHP version retains its familiar version number, use Plesk’s exact documented build mapping rather than assuming any recent build is safe. A vendor-specific backport is not a general promise of ongoing upstream support. Put migration to a supported application/runtime combination on the follow-up plan, with an owner and target date.
Plan a short, observable maintenance change
- Confirm current configuration, account ownership and a recoverable backup before the transaction.
- Notify the person who can approve business downtime and identify the functions that need testing.
- Apply updates through the responsible vendor channel and save the full completion record.
- Replace each affected runtime service or handler using the correct panel-supported method.
- Verify the public request route, test application behaviour and monitor the initial recovery period.
- Keep failed or unverified services isolated rather than silently returning them to the public pool.
A backup is useful only if it can be restored under a safe runtime. For rollback, prefer a compatible corrected handler or a static maintenance route. Restoring the vulnerable package to make an error disappear would reopen the original issue. If a handler migration is required, test extensions, configuration differences and application compatibility rather than selecting another version solely because it is listed in a dropdown.
Verify the domain, not just the server’s default PHP
A successful panel login and a green update notification do not prove that the customer website now uses the intended interpreter. Check a protected dynamic path on each affected domain. Compare the web SAPI, assigned handler and package identity with the inventory. Avoid leaving public phpinfo files or status endpoints behind as part of the evidence collection.
| Observation | Follow-up required |
|---|---|
| Panel updated, website handler unchanged | Check whether the website package correction was installed and activated |
| Default PHP changed, legacy domain remains old | Review the domain’s explicit selection or inheritance |
| Apache FPM restarted, website uses LiteSpeed | Use the serving handler’s appropriate replacement procedure |
| One domain passes, another returns errors | Inspect the second domain’s pool, extensions and configuration |
| Correct packages installed, old node still available | Remove or update that node before it can receive requests |
Maintain separate results for each affected runtime family. This prevents the most common administrative shortcut: using one successful page request as evidence for dozens of differently configured domains.
Test the business workflows the panel cannot validate
Hosting tools can report service state, but they cannot know whether a payment callback, customer login or enquiry workflow remains correct. Agree a small test set with the site owner. Use non-sensitive test content and approved provider test modes. Verify both the response shown to the visitor and the intended backend result; an attractive success message is not proof that the expected message or transaction arrived.
- Confirm dynamic pages render without new PHP warnings or 5xx responses.
- Check session-based functions and any framework cache behaviour.
- Test enquiry submission and expected error handling with a designated test mailbox.
- Check scheduled jobs and integrations that may use a different CLI interpreter.
- Monitor application errors and resource use after traffic returns.
Example: one account has an explicit legacy handler
Consider a hypothetical agency server with a dozen domains. The administrator updates the default PHP branch and confirms the panel’s own correction. One older customer domain still has an explicit handler assignment, so it is excluded from the first verification pass. The inventory reveals this instead of letting it remain a hidden exception. The team obtains that handler’s supported fix or moves the application to a tested corrected runtime.
The handover names the domains, runtime suppliers, package or component revisions, restart evidence and outstanding migration work. It also records whether earlier exposure needs investigation. This is useful security work even when the websites look exactly the same afterwards: the material change is in the runtime and its verified use, not the visual design.
Frequently asked questions
Does updating cPanel automatically prove every PHP version is patched?
No. Determine which packages and handlers the update actually covered. Include explicitly assigned domain versions and supported alternative PHP suppliers. Verify the installed fix and active request path for each relevant runtime.
Can I restart Apache PHP-FPM on a LiteSpeed server to finish the job?
Do not assume that covers the website. cPanel’s documentation distinguishes LiteSpeed’s lsphp handler from its Apache PHP-FPM implementation. Identify the serving runtime and follow that supplier’s replacement method.
Why does Plesk’s own engine appear in the checklist?
A panel can bundle PHP for its administration interface independently of website handlers. Plesk’s specific advisory includes panel-engine remediation. Confirm the applicable component update as well as the PHP package used by each domain.
Should a customer run the cPanel restart script from their account?
No. This is server-administration work for the responsible operator. Shared-hosting customers should ask their provider for scoped remediation confirmation. Do not request or share a root password to resolve an ordinary hosting support question.
What if a legacy application cannot use the corrected supported runtime?
Ask the actual package supplier whether a verified backport is available, and confirm its maintenance coverage. If there is no reliable correction, isolate the service while arranging migration or remediation. A generic build date or an unofficial workaround does not close the risk.
Can one successful website test cover every domain on the server?
Only if the evidence genuinely establishes a common corrected request path and all relevant assignments are included. On mixed-handler servers, keep per-domain or per-runtime coverage records. Explicit legacy selections and staging services are easy to overlook.
Sources and further reading
Official documentation and advisories supporting the technical points above. The recovery workflows and examples are editorial guidance for adapting to your own systems.
- cPanel: MultiPHP Manager for WHM — accessed 22 October 2026
- cPanel: PHP FastCGI Process Manager and restart guidance — accessed 22 October 2026
- Plesk: PHP2Shell component and runtime remediation advisory — accessed 22 October 2026
Get practical support for your next step.
Tell CyberXperts what happened, which systems are affected and what you have already checked. Do not include passwords or sensitive incident evidence in the initial form.
Discuss your website security