Check Linux servers for the PHP2Shell vulnerabilities, then update supported PHP installations through their existing package sources.
A single server might need APT, DNF, YUM or a hosting panel's updater. A fleet can have all of them, alongside several PHP branches and custom installations. DePHP2Shell detects those differences, reports what needs attention and attempts a conservative update where a supported procedure exists.
The tool is one Bash script. The server needs no Python, Node.js, PHP library or downloaded helper. Checking is the default action.
Download the script, inspect it, then run it as root:
wget -O dephp2shell.sh https://raw.githubusercontent.com/pbkwee/dephp2shell/main/dephp2shell.sh less dephp2shell.sh sudo bash dephp2shell.sh --check
These examples use main, the latest development version. For repeatable deployments, replace main in the download URL with a reviewed release tag or commit. Alternatively, clone the repository:
git clone --branch main https://github.com/pbkwee/dephp2shell.git
cd dephp2shell
less dephp2shell.sh
sudo bash dephp2shell.sh --checkA check inventories installed PHP packages, discovered runtimes and relevant running processes. It refreshes configured APT, DNF or YUM repositories for managed PHP and skips package installation, service configuration and service restarts. Human-readable results appear on screen; detailed diagnostics are saved privately for each run.
Terminal output adapts to reported capabilities. Use --no-color to disable colour,
or --no-color --no-bold for completely unstyled text.
See usage and logging, resolution options, coverage and download help for old servers. Maintainers can read the implementation reference and security background.
After reviewing the check, arrange backups and a maintenance window:
sudo bash dephp2shell.sh --fix
The tool checks prerequisites, attempts supported package or panel updates, restarts supported services where needed, then checks again. Updates and restarts can interrupt applications. Plesk's component updater can also update databases, mail and web servers.
Normal --fix preserves PHP branches. The November update can use eligible
verified updates from configured sources when the current publisher has no fix. APT updates
include verified required runtime libraries from reviewed sources. Supported
DNF4 updates can also install verified required runtime libraries. Other applications may share those libraries
and need testing afterwards. Existing Sury/ondrej PHP can use a recognised fixed package from its configured source.
Adding or expanding a PHP repository requires separate approval for the offered source and branches. The script checks package names, PHP extension compatibility, architecture, and the package transaction. Review installed PHP sources and repository permissions in the resolution guide.
A clear result covers the installations and processes inspected for CVE-2026-109618 and CVE-2026-109619. Website testing, compromise assessment and a general security audit remain separate work. Older operating systems can still need migration even after PHP is fixed. See upgrade and migration options.
For the November PHP security release, add
--november-2026 to either --check or --fix. An affected build stays
affected if the update leaves that build installed. A newer unreviewed vendor
revision needs verification against its publisher's advisory.
Run python3 tests/run.py for offline fixture tests. See the
maintainer reference
for syntax checks, older-interpreter tests and evidence requirements.
See the branding guide for logo files, colours and usage notes, including the editable SVG logo.
Released under the MIT licence, with no warranty. Use it at your own risk and verify the results and application health on your servers.
DePHP2Shell is the project's name. RimuHosting is a trademark of RimuHosting; see NOTICE. The software licence does not imply endorsement of forks or grant trademark rights.
DePHP2Shell was developed by the team at RimuHosting. We have been hosting Linux virtual machines since 2003. That history brings a wide variety of distributions, hosting panels, PHP versions and local customisations. Our server patching tools grew from the practical work of maintaining those different environments.
Keeping a public server secure protects its users and everyone else who could be harmed if that server is taken over. We see that care as part of running a hosting service, and as a responsibility shared by everyone operating public services.
For an upgrade or migration you plan to do yourself, see the distrorejuve guide. If you'd like RimuHosting to assess your server and handle a move to its hosting, request a free assessment at DistroRejuve.
RimuHosting offers a no-cost, no-obligation investigation and a report on mitigation or migration to a server with a supported OS and PHP, including for servers hosted elsewhere. A server migration can stay with your current hosting provider. Contact RimuHosting to coordinate the server manifest and investigation. Any changes or further work are agreed separately.
