ViciDial

PHP2Shell: How to Patch Your VICIdial Server

Your VICIdial agent and admin screens are written in PHP, which means a vulnerability in PHP is a vulnerability in your call center. Whether you’re running VICIdial on AWS or Azure through our marketplace images, this guide walks you through protecting your server from PHP2Shell.

What is PHP2Shell?

PHP2Shell is the name given to two critical vulnerabilities in PHP itself, CVE-2026-109618 and CVE-2026-109619, published on 21 October 2026:

  • Severity: Critical. An attacker can run their own code on your server just by sending it web requests.
  • Affected: PHP 5.4 through 8.5, on any server where PHP answers web requests, including VICIdial’s web interface.
  • Exploited: Yes, attacks have been seen in the wild.
  • Fixed in: PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12.

For a call center, a compromised server can mean exposed customer data, stolen agent credentials and fraudulent calls charged to your carrier account, so treat this as urgent. Updating PHP is the only complete fix.

You have two ways to get protected:

  1. Patch your existing server: the quickest option, and the right one for most people.
  2. Launch a new instance from our latest image and migrate: best if your server runs an operating system that no longer gets security updates (such as CentOS 7), or if you’d like a clean start.

Quick Tip: Schedule the patch outside your calling hours. Restarting the web server briefly logs out agents who are using the web interface.

Option 1: Patch Your Existing Server

Step 1: Back Up First

Before changing anything, take a snapshot of your server’s disk:

  • AWS: EC2 console → Volumes → select your instance’s volume → Actions → Create snapshot.
  • Azure: Azure Portal → your VM → Disks → select the OS disk → Create snapshot.

Step 2: Check Your Operating System and PHP Version

Log in to your server over SSH and switch to root (sudo -i); the commands in this guide run as root. Then run:

cat /etc/os-release
php -v

Our current VICIdial images run AlmaLinux 9 with PHP 8.3 from the Remi repository.

Step 3: Install the Updates

dnf upgrade -y 'php*'

Then restart the web server so it loads the new PHP:

systemctl restart httpd

If PHP-FPM is running on your server (systemctl is-active php-fpm), restart it too:

systemctl restart php-fpm

Step 4: Confirm You Are Patched

php -v

The version should be 8.3.36 or newer (or 8.2.35, 8.4.27 or 8.5.12 or newer if you run a different PHP branch).

Running CentOS 7? CentOS 7 reached end of life in June 2024 and no longer receives security updates of any kind. Its PHP won’t be fixed, so Option 2 is the safe way forward.

Step 5: Check for Signs of Compromise

PHP2Shell was exploited before many servers were patched, so take a few minutes to look for anything an attacker may have left behind:

  1. Recently changed PHP files. This lists PHP files in the web root changed since mid-October 2026; look for anything you don’t recognise:
find /var/www -name '*.php' -newermt '2026-10-17' -ls
  1. Admin users. In the VICIdial admin screen, go to Users and check for accounts with user level 8 or 9 that you don’t recognise.
  2. Scheduled jobs. Check crontab -l for entries that aren’t part of the standard VICIdial jobs.
  3. Call records. Review recent outbound calls and your carrier bill for destinations you don’t call.

If you find something suspicious, change all VICIdial user and carrier passwords, and consider moving to a fresh instance (Option 2).

Option 2: Launch a New Instance and Migrate

Our latest VICIdial images already include the PHP2Shell fix. Every image build is automatically checked for it before release. They run AlmaLinux 9 with the latest packages, so moving to a new instance also gets you a fully supported operating system.

Step 1: Launch the Latest Image

Launch a new instance from our image on your cloud of choice:

Open the same ports as on your current server (web, SIP and RTP) in your security group or network security group, and let the instance finish its first boot.

Step 2: Check the Database Versions

VICIdial records its database version in its settings. Check it on both servers:

mysql asterisk -e "SELECT db_schema_version FROM system_settings;"

If the new server shows a higher number than the old one, your database will need upgrading after the move (Step 5).

Step 3: Back Up Your Call Center on the Old Server

Schedule the move outside calling hours. On the old server, as root, stop the dialer so nothing changes during the backup:

crontab -l > /root/crontab-backup.txt
crontab -r
systemctl stop vicidial

The first line saves your cron jobs, and the second removes them; VICIdial’s keepalive job runs from cron every minute and would otherwise restart the dialer. The last line stops the dialer itself (on older images without the vicidial service, removing the cron jobs and waiting a couple of minutes is enough). Then back up the database, your call recordings and any custom audio files:

mysqldump --single-transaction asterisk > /tmp/asterisk.sql
tar czf /tmp/recordings.tar.gz -C /var/spool/asterisk monitorDONE
tar czf /tmp/sounds.tar.gz -C /var/lib/asterisk sounds

If your recordings are large, consider copying them across separately afterwards with rsync. You can migrate your agents first and the recording archive later.

Also note down any custom changes you made outside VICIdial’s admin screens, such as files in /etc/asterisk/ you edited by hand, and your SSL certificate setup.

Step 4: Copy the Backup to the New Server

From the old server, copy the files to the new server’s /tmp folder (use your new instance’s username and IP address):

scp /tmp/asterisk.sql /tmp/recordings.tar.gz /tmp/sounds.tar.gz YOUR-USER@NEW-SERVER-IP:/tmp/

Step 5: Restore on the New Server

On the new server, as root, stop the dialer the same way, then import your database:

crontab -l > /root/crontab-new.txt
crontab -r
systemctl stop vicidial
mysql asterisk < /tmp/asterisk.sql

Your users, campaigns, lists and carriers now come from your old server, so log in with your existing VICIdial admin account from here on. The credentials generated for the new instance no longer apply.

If the old server’s db_schema_version was lower (Step 2), apply VICIdial’s database upgrade script, which ships with the new image:

mysql -f asterisk < /usr/src/astguiclient/trunk/extras/upgrade_2.14.sql

Your database still holds the old server’s IP address. Update it to the new server’s private IP address (hostname -I shows it):

/usr/share/astguiclient/ADMIN_update_server_ip.pl --old-server_ip=OLD-PRIVATE-IP --server_ip=NEW-PRIVATE-IP --auto

Restore your recordings and audio files:

tar xzf /tmp/recordings.tar.gz -C /var/spool/asterisk
tar xzf /tmp/sounds.tar.gz -C /var/lib/asterisk

Put the new server’s cron jobs back and restart it:

crontab /root/crontab-new.txt
reboot

Step 6: Test and Switch Over

  1. Log in to the admin screen and check your campaigns, lists, users and carriers.
  2. Update your carrier with the new server’s public IP address if they allow-list it, and re-register any phones or softphones to the new address.
  3. Make a few test calls before going live.
  4. Point your agents (or your DNS record) at the new server, and set up SSL again (see How to Enable SSL Certificate on VICIdial Cloud Server).

Keep the old server stopped (not deleted) for a few days until you’re happy everything is working, then delete it and its snapshots.

Conclusion

PHP2Shell is serious, but the fix is simple: update PHP. On most servers that’s a single dnf upgrade and a restart. If your server is on an older operating system such as CentOS 7, a fresh instance from our latest image gets you patched and back to a fully supported platform.

Pro Tip: Migrating a busy call center has a lot of moving parts. Our support team is happy to help you plan or carry out the move. Just reach out to support@solvedevops.com.