AdminsForum
Guide How to Fix PHP2Shell (CVE-2026-109618/109619) on CyberPanel - Printable Version

+- AdminsForum (https://adminsforum.com)
+-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels)
+--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel)
+---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials)
+----- Forum: CyberPanel Security Guides (https://adminsforum.com/Forum-cyberpanel-security-guides)
+----- Thread: Guide How to Fix PHP2Shell (CVE-2026-109618/109619) on CyberPanel (/Thread-guide-how-to-fix-php2shell-cve-2026-109618-109619-on-cyberpanel)



How to Fix PHP2Shell (CVE-2026-109618/109619) on CyberPanel - JAY - 10-22-2026

How to Fix PHP2Shell (CVE-2026-109618/109619) on CyberPanel

On 21 October 2026 PHP released emergency fixes for two critical bugs, CVE-2026-109618 and CVE-2026-109619 ("PHP2Shell"). They can let an attacker run code on your server without logging in, and attacks are already happening. This guide shows how to patch a server running CyberPanel, step by step.

New to PHP2Shell? Read the overview first: PHP2Shell explained: what it is and how to fix it.

The fixed versions
Your PHP must be at least: 8.5.12, 8.4.27, 8.3.36 or 8.2.35. Older branches (7.4 to 8.1) need a patched build from your vendor. Update every PHP version installed, not just the one your main site uses.

Step 1: See which PHP versions you have
CyberPanel uses LiteSpeed's PHP builds, called lsphp. Each version lives in its own folder:
Code:
ls -d /usr/local/lsws/lsphp* for d in /usr/local/lsws/lsphp*/bin/php; do echo "$d $($d -r 'echo PHP_VERSION;')"; done

Step 2: Update lsphp
Take a snapshot of the server first. Then, as root:
Code:
# Ubuntu / Debian apt-get update apt-get install --only-upgrade 'lsphp*' -y # AlmaLinux / Rocky / CentOS yum update 'lsphp*' -y
This updates every installed lsphp version from LiteSpeed's repository. The patched lsphp packages were available in LiteSpeed's repository by 22 October.

Step 3: Restart the PHP workers
LiteSpeed keeps PHP workers running between requests, so restart them:
Code:
pkill lsphp systemctl restart lsws
New workers start automatically with the patched version.

Step 4: Confirm
Run the version loop from Step 1 again. Every lsphp should now show 8.5.12, 8.4.27, 8.3.36 or 8.2.35 (or newer).

Check the version your websites really use
The command line can show a different PHP from the one serving websites. To be sure, create a file called
Code:
v.php
in a website's folder containing:
Code:
<?php echo PHP_VERSION;
Open
Code:
https://your-domain/v.php
, check the number, then delete the file.

Can't update yet? Temporary protection
These settings reduce the risk until a patched version is installed. They are not a full fix. Add them to the php.ini of each PHP version (PHP > Edit PHP Configs > Advanced in CyberPanel, or
Code:
/usr/local/lsws/lsphp83/etc/php/8.3/litespeed/php.ini
on Ubuntu), then restart PHP:
Code:
session.upload_progress.enabled = 0 ; PHP 8.5 only: fatal_error_backtraces = 0
Don't set these with
Code:
ini_set()
or a
Code:
.user.ini
file; they must be set server-side. The PHP team also suggests
Code:
memory_limit = -1
against CVE-2026-109618, but that removes PHP's memory cap, so only use it short-term and with care.

After patching: check you weren't hit
Attacks started on 17 October, before the fix existed. Spend ten minutes on these checks:
  • PHP files created or changed since 17 October that you don't recognise, especially in upload folders:
    Code:
    find /home/*/public_html -name "*.php" -newermt 2026-10-17 -type f 2>/dev/null | head -50
  • Unknown cron jobs:
    Code:
    crontab -l
    for root and each site user.
  • Unusual CPU use (crypto miners are common):
    Code:
    ps aux --sort=-%cpu | head
If something looks wrong, change the passwords and API keys your PHP apps use, because these bugs can leak memory contents.

Questions? Ask in CyberPanel Security Support with your OS, CyberPanel version and the output of your PHP version check.

Sources (checked 22 October 2026): Tenable PHP2Shell FAQ ยท Qualys: mitigate and patch PHP2Shell