There was a problem loading the comments.

Security Advisory: Critical PHP vulnerabilities (PHP2Shell)

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Overview

Two critical vulnerabilities in PHP, known as PHP2Shell and disclosed on 21 October 2026, affect TV Server and HD Encoder products.

 

Affected products

The Encoded Media products affected by the above vulnerabilities are:

 

TV Server platform 3.x, 4.x, 5.x

HD Encoder platform 3.x, 4.x, 5.x

 

The vulnerabilities are tracked as CVE-2026-109618 and CVE-2026-109619 and are rated Critical (9.2 out of 10). TV Server platform 2.x and earlier is unaffected.

 

Risk level

Encoded Media products hold no customer data and the risk is what an attacker could do from a compromised system:

  • Degrade the function of your product by stopping or interrupting TV playback
  • Use it for malicious activity such as sending unwanted traffic to other sites

A successful attacker will have been able to reach your server over the LAN. A server that is on a separate, protected segment, one that cannot be reached from outside, is at significantly lower risk.

 

Mitigation

The vulnerabilities can be exploited through specially crafted file upload requests to the web interface. The mitigation code:

  • Reconfigures the web server to block these requests before they reach PHP
  • Disables a related PHP upload processing feature

This blocks the known upload based exploitation methods while a permanent solution is developed and tested. Because neither TV Server nor HD Encoder use uploads, the block has no effect on your server's features or function.

 

Code

The code below checks your system before making changes, tests itself afterwards, and takes effect without a restart. To check the version of your TV Server or HD Encoder product, please see our KB article Understanding your TV Server status page.

 

TV Server and HD Encoder products running platform 5.x
Run the following at a shell prompt on the server:
 
sudo bash <<'EOF'
s=/etc/nginx/sites-available/tvserver;d(){ echo "[php2shell] ERROR: $*";exit 1;}
printf '%s\n' '; Controlled by etvd.' '' '; Nothing here uses upload progress, and it hands an attacker a session write' '; before any of our code runs - the delivery path for PHP2Shell' '; (CVE-2026-109618/109619). Keep it off even on a patched PHP.' 'session.upload_progress.enabled = Off' >/etc/php/8.3/fpm/conf.d/99-etvd.ini
systemctl reload php8.3-fpm||d "php-fpm did not reload"
if ! grep -q multipart/form-data $s;then o=$(nginx -t 2>&1)||d "nginx config already broken, nothing changed: $o"
cp -p $s $s.pre-php2shell;awk '{print}!x&&/^[ \t]*server_name[ \t]/{print "    if ($content_type ~* \"multipart/form-data\") {\n        return 415;\n    }";x=1}' $s.pre-php2shell >$s
o="no server_name line";grep -q multipart/form-data $s&&o=$(nginx -t 2>&1)||{ cp -p $s.pre-php2shell $s;d "could not add the rule, $s restored, nginx not reloaded: $o";}
systemctl reload nginx||d "nginx did not reload";sleep 1;fi
u=$(curl -so/dev/null -m10 -w%{http_code} -Fx=1 http://127.0.0.1/login.php);p=$(curl -so/dev/null -m10 -w%{http_code} http://127.0.0.1/login.php)
[ $u = 415 ]&&[ $p != 415 ]&&[ $p != 000 ]||d "upload got HTTP $u (want 415), plain request got HTTP $p"
echo "[php2shell] done: uploads refused"
EOF

 

The output from this should be:

[php2shell] done: uploads refused

 

TV Server and HD Encoder products running platform 4.x
Run the following at a shell prompt on the server:
 
sudo bash <<'EOF'
n=etvd-no-multipart;c=/etc/apache2/conf-available/$n.conf;l=/etc/apache2/conf-enabled/$n.conf;i=/etc/php5/apache2/conf.d/99-etvd.ini;d(){ echo "[php2shell] ERROR: $*";exit 1;}
[ -d ${c%/*} ]&&[ -d ${l%/*} ]&&[ -d ${i%/*} ]||d "this is not a TVS 4 (Apache 2.4 + mod_php5) box, nothing changed"
o=$(apache2ctl configtest 2>&1)||d "Apache config already broken, nothing changed: $o"
printf '%s\n' '; Controlled by etvd. PHP2Shell (CVE-2026-109618/109619): keep upload progress off.' 'session.upload_progress.enabled = Off' >$i
printf '%s\n' '# Controlled by etvd.' '# PHP parses multipart bodies before any of our code runs, which is how' '# PHP2Shell (CVE-2026-109618/109619) gets in. Only the quicksite image' '# upload needs them, so refuse them outright.' "<If \"req('Content-Type') =~ m#multipart/form-data#i\">" '    Require all denied' '</If>' >$c
ln -sf ../conf-available/$n.conf $l;o=$(apache2ctl configtest 2>&1)||{ rm -f $l $c;d "Apache rejected the rule, removed again, Apache not reloaded: $o";}
service apache2 reload >/dev/null||d "Apache did not reload; check: service apache2 status";sleep 1
u=$(curl -so/dev/null -m10 -w%{http_code} -Fx=1 http://127.0.0.1/login.php);p=$(curl -so/dev/null -m10 -w%{http_code} http://127.0.0.1/login.php)
[ $u = 403 ]&&[ $p != 403 ]&&[ $p != 000 ]||d "upload got HTTP $u (want 403), plain request got HTTP $p"
echo "[php2shell] done: uploads refused"
EOF

 

The output from this should be:

[php2shell] done: uploads refused

 

TV Server and HD Encoder products running platform 3.x
Run the following at a shell prompt on the server:
 
sudo bash <<'EOF'
c=/etc/apache2/conf.d/etvd-no-multipart.conf;m=/etc/apache2/mods-enabled/rewrite.load;e=;d(){ echo "[php2shell] ERROR: $*";exit 1;}
[ -d ${c%/*} ]&&[ -d ${m%/*} ]||d "no /etc/apache2/conf.d or mods-enabled here, nothing changed"
o=$(apache2ctl configtest 2>&1)||d "Apache config already broken, nothing changed: $o"
[ -e $m ]||{ [ -e /etc/apache2/mods-available/rewrite.load ]||d "mod_rewrite is not installed, nothing changed";ln -s ../mods-available/rewrite.load $m;e=1;}
printf '%s\n' '# Controlled by etvd.' '# Refuse multipart bodies before PHP parses them (PHP2Shell, CVE-2026-109618/109619).' '# Per-directory, so it also reaches virtual hosts that have rewrite rules of their own.' '<Directory />' '    RewriteEngine On' '    RewriteCond %{HTTP:Content-Type} multipart/form-data [NC]' '    RewriteRule ^ - [F]' '</Directory>' >$c
o=$(apache2ctl configtest 2>&1)||{ rm -f $c;[ -n "$e" ]&&rm -f $m;d "Apache rejected the rule, removed again (and mod_rewrite left as it was), Apache not reloaded: $o";}
service apache2 reload >/dev/null 2>&1||d "Apache did not reload; check: service apache2 status";sleep 1
s(){ wget -S -O /dev/null -t 1 -T 10 "$@" http://127.0.0.1/login.php 2>&1|awk '/^  HTTP\//{c=$2}END{print c+0}';}
u=$(s --header='Content-Type: multipart/form-data; boundary=x' --post-data=x);p=$(s)
[ $u = 403 ]&&[ $p != 403 ]&&[ $p != 0 ]||d "upload got HTTP $u (want 403), plain request got HTTP $p"
echo "[php2shell] done: uploads refused${e:+ (mod_rewrite enabled for it)}; PHP $(dpkg-query -W -f='${Version}' libapache2-mod-php5)"
EOF

 

The output from this should be:

[php2shell] done: uploads refused (mod_rewrite enabled for it); PHP 5.3.10-1ubuntu3.13

Encoded Media products covered by an active support plan will receive a full software update that addresses these vulnerabilities in due course.

 

Verification

 To check the above mitigation has been successful, run the following at a shell prompt on the server:

 

check(){ u=http://$1/login.php; t=$(date -u +%FT%TZ); s(){ o=$(curl -sS -o /dev/null -w '%{http_code}' -m 10 "$@" $u 2>&1); c=${o: -3}; [ $c != 000 ] && echo $c && return; o=${o%???}; o=${o%$'\n'}; printf '%s \033[1;31mFAIL\033[0m %s: no response from host (%s)\n' $t $u "${o#curl: (*) }" >&2; return 1; }; up=$(s -F probe=1) && pl=$(s) || return 1; case $up/$pl in 403/403|403/415|415/403|415/415);; 403/*|415/*) printf '%s \033[1;32mPASS\033[0m %s: upload refused (HTTP %s), plain request HTTP %s\n' $t $u $up $pl; return 0;; esac; printf '%s \033[1;31mFAIL\033[0m %s: upload got HTTP %s (want 403 or 415), plain request got HTTP %s\n' $t $u $up $pl; return 1; }; check 127.0.0.1

 

A pass will appear similar to the following response:

 

2521ebeb17fae34bef9b74ada6dce473bd60d32d4f32c5020d28c6f19c4b2adf362420c0fdbf65f3?t=1a5212df2dec725199a517286019e6b3

 

A failure will be denoted as below:

 

979de8003f908198fd06d0386099953518fcec1ce9ea01e8499dcd0b97251fb08a8258703d5ac785?t=ef24d6594a8a5cf638e087a20251e606

 

Legacy products

We are not able to provide software updates for older legacy products outside their maintenance period. For these, the mitigations outlined above are the recommended protection.

 

If you'd like to talk about support plan options, or replacing older units, your Encoded Media reseller will be pleased to help you or email support@encodedmedia.com


Share via

Related Articles

© Encoded Media