PHP CVE Patching

Just curious if there is a plan for some mitigation tomorrow once the vulnerability or updates are released. I have mostly freepbx 17 systems on Debian 12 but maybe a handle on freepbx 16.

hoping there will be some support to help patch the 16 systems as well

FPBX 16 runs version PHP 7.4.16. Which is EOL. It probably won’t get updated if I had to guess.

My fully updated FPBX 17 runs PHP 8.2.34. Which is still supported. And per my googling the fix is supposed to be released today (10-21-2026). (1) Luis Dalmolin on X: “These are the expected updates for the PHP RCE CVEs (CVE-2026-109618 / CVE-2026-109619). Releases tomorrow, 10am EDT. 8.2.34 → 8.2.35 8.3.35 → 8.3.36 8.4.26 → 8.4.27 8.5.11 → 8.5.12 PHP 8.1 and older are EOL; no patches announced/expected so far.” / X

Now the patches are out can we update the freepbx 17 systems at least or not yet?

Any idea what to mitigate for 16?

Check out this page, CVE-2026-109618 and CVE-2026-109619: What you should do now - Vincent Schmalbach

but he’s clear that it’s a stop-gap and the only real mitigation is to update PHP

:police_car_light: Disclaimer – this fix is not an official Sangoma-endorsed patch.

These are the interim steps I have applied and verified on a FreePBX 16 installation and a FreePBX 17 installation, before rolling them out across the rest of our fleet and while awaiting FreePBX/Sangoma-specific guidance. They follow PHP’s published advice for blocking confirmed session upload-progress attack paths. They are partial mitigation, not a complete fix for either vulnerability. I will update or remove this post as formal guidance becomes available.

:warning: I prepared and tested these steps on my own systems. This is not official FreePBX or Sangoma guidance. Proceed at your own risk.

I am sharing a sensible interim measure, but I cannot honestly call it the most protection available.

PHP confirms that disabling upload progress and restarting workers blocks confirmed session attack paths. It also lists additional measures for the other vulnerability, including request-size controls and changes to memory handling. Those require assessment before applying them to a live PBX. Only patching fully resolves both vulnerabilities.

FreePBX 16 and 17: interim PHP upload-progress mitigation

Date: 21 October 2026, 16:00 UTC
Assisted-by: ChatGPT-6.1-sol

The configuration changes and web verification were tested on the two installations described below.

Why we are doing this now

PHP has disclosed two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, that can allow unauthenticated remote code execution. They affect the PHP runtime serving web requests, rather than being a FreePBX module fault. PHP warns that an attack can occur before application code runs, so a FreePBX login screen is not sufficient protection.

The PHP security advisory recommends disabling session upload progress to block confirmed session attack paths for CVE-2026-109619. This is risk reduction while compatible security packages are obtained. It does not fix CVE-2026-109618 or every variant of CVE-2026-109619. Only a patched PHP build provides the complete fix.

I applied both options below, matching the interim configuration supplied by my hosting provider. PHP’s advisory specifically identifies session.upload_progress.enabled=0 as the control that blocks the confirmed session paths. The cleanup setting is not a separate complete fix.

session.upload_progress.enabled=0
session.upload_progress.cleanup=0

Normal file uploads remain enabled. PHP’s built-in session upload progress tracking is disabled; features relying on that tracking may lose their progress indication.

Official source: PHP security advisory, 21 October 2026 (see “Security advisory: Critical remote code execution vulnerabilities, update now”).

Scope and current status

These instructions cover the inspected Apache mod_php installations. Check other machines before assuming they use the same PHP paths and handler. They do not cover PHP-FPM or additional PHP versions.

Package availability below was observed on the tested systems on 21 October 2026. It may have changed by the time you read this; these are observations from those systems, not a platform-wide availability statement.

System Inspected web PHP Configuration Package supplier Status at the time of checks
FreePBX 16 on Sangoma Linux 7 7.4.16, apache2handler /etc/php.ini, /etc/php.d/ Sangoma sng-sng7php74 repository Compatible patched package availability not established
FreePBX 17 on Debian 12 8.2.31, apache2handler /etc/php/8.2/apache2/php.ini Debian Security Refreshed lists offered 8.2.34-1~deb12u1; its 4 October changelog predates these fixes and contains neither CVE

Both test installations returned 0 for both settings through Apache web PHP after the changes. Use the steps below only where your installation matches the stated layout, then verify your own result.

1. Identify the installation

Run as root:

cat /etc/os-release
php -v
php --ini
ps -eo pid,comm,args | awk '/[h]ttpd|[a]pache2|[p]hp-fpm/'

CLI PHP can load different settings from Apache. The final web verification is required; CLI output alone does not establish protection for web requests.

2A. Apply on FreePBX 16: inspected Sangoma Linux 7 layout

Run as root. This creates a separate configuration file, preserving an existing copy if present, checks Apache configuration and restarts Apache to replace its workers.

Web access will briefly be interrupted. This command does not restart Asterisk.

(
set -e
test -d /etc/php.d
target=/etc/php.d/zz-upload-progress-mitigation.ini

if [ -e "$target" ]; then
    cp -a "$target" "${target}.bak.$(date +%Y%m%d-%H%M%S)"
fi

cat > "$target" <<'EOF'
; Temporary mitigation. Security patches still required.
session.upload_progress.enabled=0
session.upload_progress.cleanup=0
EOF

apachectl configtest
systemctl restart httpd
systemctl is-active httpd
)

Expected: Syntax OK and active. If the configuration check fails, the block stops before restarting Apache. Investigate errors before proceeding.

2B. Apply on FreePBX 17: inspected Debian 12 / PHP 8.2 layout

Run as root. This targets Apache PHP, rather than the separate CLI configuration.

Web access will briefly be interrupted. This command does not restart Asterisk.

(
set -e
test -d /etc/php/8.2/apache2/conf.d || {
    echo "Apache PHP configuration directory missing; stopping."
    exit 1
}
target=/etc/php/8.2/apache2/conf.d/99-upload-progress-mitigation.ini

if [ -e "$target" ]; then
    cp -a "$target" "${target}.bak.$(date +%Y%m%d-%H%M%S)"
fi

cat > "$target" <<'EOF'
; Temporary mitigation. Security patches still required.
session.upload_progress.enabled=0
session.upload_progress.cleanup=0
EOF

apache2ctl configtest
systemctl restart apache2
systemctl is-active apache2
)

Expected: Syntax OK and active. A duplicate SSL module warning was seen on the inspected machines, but did not prevent their configuration checks or restarts. A failed check or inactive service requires investigation.

3. Verify through web PHP on either version

Run the following block as root in an interactive Bash terminal. Enter http or https, then the corresponding port serving your PBX web root. Ports vary between installations. The command assumes that this virtual host serves /var/www/html.

This creates a temporary PHP file with a localhost-only check, requests it over loopback and automatically deletes it on normal completion or a command failure. It exposes only the PHP version, handler, configuration path and two settings. No restart is required. For HTTPS, certificate checking is skipped only for this localhost test. HTTP is also supported; both use localhost.

(
set -e
read -r -p 'PBX protocol (http or https): ' php_web_scheme </dev/tty
case "$php_web_scheme" in
    http|https) ;;
    *) echo "Enter http or https."; exit 1 ;;
esac
read -r -p 'PBX port: ' php_web_port </dev/tty
case "$php_web_port" in
    ''|*[!0-9]*) echo "Enter a numeric port."; exit 1 ;;
esac
test "$php_web_port" -ge 1
test "$php_web_port" -le 65535
test -d /var/www/html

check_file=$(mktemp /var/www/html/php-mitigation-check-XXXXXXXX.php)
trap 'rm -f "$check_file"' EXIT

cat > "$check_file" <<'PHP'
<?php
if (!in_array($_SERVER['REMOTE_ADDR'] ?? '', ['127.0.0.1', '::1'], true)) {
    http_response_code(403);
    exit;
}
header('Content-Type: text/plain');
echo "PHP version: ", PHP_VERSION, "\n";
echo "PHP handler: ", PHP_SAPI, "\n";
echo "Loaded configuration: ", php_ini_loaded_file(), "\n";
foreach (['session.upload_progress.enabled', 'session.upload_progress.cleanup'] as $key) {
    echo $key, '=', var_export(ini_get($key), true), "\n";
}
PHP

chmod 644 "$check_file"
curl_options=(--noproxy '*' --fail --silent --show-error --max-time 15)
if [ "$php_web_scheme" = https ]; then
    curl_options+=(--insecure)
fi
curl "${curl_options[@]}" \
    "${php_web_scheme}://127.0.0.1:${php_web_port}/$(basename "$check_file")"
)

Expected results:

PHP handler: apache2handler
session.upload_progress.enabled='0'
session.upload_progress.cleanup='0'

These results confirm the settings for the tested web request. Other virtual hosts, directories or PHP handlers can have overrides and should be checked separately where relevant. They do not prove that either underlying vulnerability has been patched.

If the request fails, redirects or returns HTML instead of the expected output, do not record the check as successful. If HTTP redirects to HTTPS, rerun the check using https and the appropriate HTTPS port.

Confirm the listening port and virtual host configuration if needed:

# FreePBX 16
apachectl -S

# FreePBX 17
apache2ctl -S

4. Obtain the permanent fix

Use the normal package supplier for each installation. Do not replace PHP with an arbitrary major version or add an unrelated repository as a shortcut.

Upstream fixed releases are PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. Distribution or vendor packages may instead backport the fixes, so verify the full package release and vendor advisory for both CVEs. A version number alone is not sufficient evidence for a backport.

FreePBX 16: check Sangoma packages

These commands refresh and list packages from the PHP repository used by the inspected machine. They install nothing:

yum --disablerepo='*' --enablerepo=sng-sng7php74 makecache
yum --cacheonly --disablerepo='*' --enablerepo=sng-sng7php74 --showduplicates list php php-common

Confirm with Sangoma that an offered package fixes both CVEs. PHP 7.4 is outside normal upstream support; a compatible vendor backport or migration plan is required. On the inspected machine, yum versionlock list returned no locks.

FreePBX 17: check Debian packages

These commands contact configured repositories and refresh metadata. They install nothing:

apt-get update
apt-cache policy php8.2-common libapache2-mod-php8.2

For the currently offered candidate’s changelog:

PAGER=cat apt-get changelog php8.2-common

A missing changelog or a download failure is not proof that fixes are absent. At the time of the inspected check, the actual candidate package’s bundled changelog was also inspected and predated this disclosure. Recheck package availability because it can change.

After a patched package is confirmed

Install the compatible vendor update through the supported process, replace all affected web PHP workers and verify the running web PHP again. Check the FreePBX interface and a normal upload workflow. Keep the mitigation enabled unless there is a specific reason to restore upload progress after patching.

Until patching is complete, restrict PBX web access to trusted addresses or VPN where practical, accounting for UCP, phone applications and provisioning access. Do not treat the interim settings as permission to expose an otherwise restricted web service.

Limits of this mitigation

It does not change PHP memory limits, upload size limits, firewall rules or PHP major versions. PHP’s official advisory lists other partial measures for the OOM vulnerability, but those require workload and resource-limit assessment before use on a live PBX. The two upload progress settings alone are not the complete official mitigation guidance and do not make an unpatched installation safe.

:police_car_light: Disclaimer – this fix is not an official Sangoma-endorsed patch.

Do not use the v16 PHP 7.4 repository commands on a PHP 5.6 installation.

v15 has the same configuration directory and Apache service as v16. The mitigation command applies; the verification below is adjusted for PHP 5.6.

Run as root. Apache web access briefly interrupts; Asterisk is not restarted.

(
set -e
test -d /etc/php.d
target=/etc/php.d/zz-upload-progress-mitigation.ini

if [ -e "$target" ]; then
    cp -a "$target" "${target}.bak.$(date +%Y%m%d-%H%M%S)"
fi

cat > "$target" <<'EOF'
; Temporary mitigation. Security patches still required.
session.upload_progress.enabled=0
session.upload_progress.cleanup=0
EOF

apachectl configtest
systemctl restart httpd
systemctl is-active httpd
)

Then verify through Apache using this PHP 5.6-compatible block. It asks for your protocol and port:

(
set -e

read -r -p 'PBX protocol (http or https): ' php_web_scheme </dev/tty
case "$php_web_scheme" in
    http|https) ;;
    *) echo "Enter http or https."; exit 1 ;;
esac

read -r -p 'PBX port: ' php_web_port </dev/tty
case "$php_web_port" in
    ''|*[!0-9]*) echo "Enter a numeric port."; exit 1 ;;
esac

test "$php_web_port" -ge 1
test "$php_web_port" -le 65535
test -d /var/www/html

check_file=$(mktemp /var/www/html/php-mitigation-check-XXXXXXXX.php)
trap 'rm -f "$check_file"' EXIT

cat > "$check_file" <<'PHP'
<?php
$remote = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
if (!in_array($remote, array('127.0.0.1', '::1'), true)) {
    http_response_code(403);
    exit;
}
header('Content-Type: text/plain');
echo "PHP version: ", PHP_VERSION, "\n";
echo "PHP handler: ", PHP_SAPI, "\n";
echo "Loaded configuration: ", php_ini_loaded_file(), "\n";
foreach (array('session.upload_progress.enabled', 'session.upload_progress.cleanup') as $key) {
    echo $key, '=', var_export(ini_get($key), true), "\n";
}
PHP

chmod 644 "$check_file"

curl_options=(--noproxy '*' --fail --silent --show-error --max-time 15)
if [ "$php_web_scheme" = https ]; then
    curl_options+=(--insecure)
fi

curl "${curl_options[@]}" \
    "${php_web_scheme}://127.0.0.1:${php_web_port}/$(basename "$check_file")"
)

Both settings should report '0'.

This remains partial mitigation.

PHP 8.2.35 (8.2.35-1~deb12u1) is now available from the Debian 12 security repository. I’ve successfully upgraded a FreePBX 17 system from 8.2.31.

I manually updated php in a test environment system, using stock debian repos, and explicitly downloading the new php version.

Using http://deb.freepbx.org/freepbx17-prod repo, it does not appear allow me to get the fixed version.

I am hesitant to do this to any production system as I do not full know how/if Sangoma’s php packaging is unique.

Is the FreePBX Instance vulnerable if the firewall blocks all IP’s but the Client/Reseller?

Debian 12

FreePBX 17

as root

apt update && apt upgrade

Worked just fine for us.

Would you please try this on your v17 test system as root:

apt update
apt install php8.2

It would only be vulnerable to those IPs that you allow through your firewall, yes.

Hi @penguinpbx,

Thanks for weighing in, I just tried did this on another test system and unfortunately did not work:

php8.2 is already the newest version (8.2.32-1~deb12u1).

@penguinpbx Will Sangoma be releasing an update for 16 (PHP 7.4)?

PHP have published a source backport for 7.4

I found this on Reddit seems to work based on what codex tells me

What are you repos listed in /etc/apt/sources.list file and also the files in /etc/apt/sources.list.d/ directory ?

I will have to do it once k get back to a pc but that seems to have patched it I believe

deb Index of /debian bookworm main non-free-firmware non-free contrib

/etc/apt/sources.list.d/

deb [arch=amd64] http://deb.freepbx.org/freepbx17-prod bookworm main

grep ^deb /etc/apt/sources.list

Technically the OS has been EOL and not supported for a while now per the calendar linked from this previous forum topic FreePBX Versions but publishing mitigation ideas and specific FreePBX module updates that lock down Apache’s use of PHP would fall under the SFCIO category.