PHPのリモートコード実行の緩和策のsession.upload_progress.enabled=0を設定

phpからリモートコード実行の緩和策のおしらせが出ていました。

23 Oct 2026
Informational advisory: Session upload progress

We suggest you set session.upload_progress.enabled=0 until the next regular bugfix release, to fully protect from an unlikely RCE vector. This setting was already listed as a mitigation in the GHSA-6wmf-4rv5-p3rp advisory for CVE-2026-109619 published on Oct 21st, 2026. If you applied it then, keep it in place and no further action is needed.

バグ修正リリースまで session.upload_progress.enabled=0 を設定しておくことがお勧めされています.
この設定はファイルアップロードのプログレス情報の設定のようです.

自環境はどうなっているかなと確認してみます.

phpinfoを用意して呼び出して確認します.

phpinfo.php
<?php echo phpinfo(); ?>

On になっているので有効状態のようです。

$ w3m -dump https://matoken.org/phpinfo.php | grep session.upload_progress.enabled
session.upload_progress.enabled  On                          On

/etc/php/8.2/apache2/php.ini, /etc/php/8.2/fpm/php.ini` を編集します.

@@ -1541,7 +1541,7 @@ session.sid_bits_per_character = 5
 ; Development Value: On
 ; Production Value: On
 ; https://php.net/session.upload-progress.enabled
-;session.upload_progress.enabled = On
+session.upload_progress.enabled = 0

 ; Cleanup the progress information as soon as all POST data has been read
 ; (i.e. upload completed).

デーモンを再起動しておきます.

$ sudo service apache2 restart
$ sudo service php8.2-fpm restart

再度設定を確認すると Off になりました.

$w3m -dump https://matoken.org/phpinfo.php | grep session.upload_progress.enabled
session.upload_progress.enabled  Off                         Off

確認が終わったらphpinfoのファイルは動かなくしておいたほうがいいかもしれません。

$ sudo rm phpinfo.php
$ w3m -dump https://matoken.org/phpinfo.php
Not Found

The requested URL was not found on this server.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Apache/2.4.68 (Debian) Server at matoken.org Port 443

この状態でWordPress のメディアアップロード、Nextcloud のファイルアップロードを試すとプログレスが動きます。
恐らくWebブラウザ側でのJavaScript実装なのかなと思います(未確認)。

環境
$ dpkg-query -W php apache2
apache2 2.4.68-1~deb12u1
php     2:8.2+93
$ lsb_release -dr
No LSB modules are available.
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
$ arch
x86_64
Note
この環境はdist-upgrade しておいたほうがいいですね。

Reposts

  • matoken :fox:

コメントを残す

メールアドレスが公開されることはありません。 ※ が付いている欄は必須項目です

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.