macOS 11 Big Sur以前のmacOSにはPHP2Shellに脆弱なphpがデフォルトで同梱されているので注意してください。詳細は以下から。
![]()
PHP Development Teamは現地時間2026年10月21日、現在最新のPHP v8.5.11を含め、認証なしでPHPを利用するWebサーバー上の任意のコードを遠隔実行できる2つの脆弱性「PHP2Shell (CVE-2026-109618、CVE-2026-109619」が発見されたとしてサーバー管理者に対し、この脆弱性を修正したPHP v8.5.12やv8.4.27, v8.3.36 v8.2.35へアップデートするように要求していますが、

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical vulnerabilities that can allow unauthenticated remote code execution. All PHP users are strongly encouraged to update immediately.
Security advisory: Critical remote code execution vulnerabilities, update now – PHP
PHPに関しては、2021年11月にリリースされた「macOS 11 Big Sur」以前のmacOS/OS Xにphpランタイムがデフォルトで同梱されていたので注意して下さい。

macOS 11.0.1 Big Surに同梱されているランタイム
macOSとスクリプト言語のランタイム
Unix系のベースのMac OS X/macOSでは、OSにデフォルトでPHPやPerl、Ruby、Pythonなどのスクリプト言語のランタイムが同梱されていたものの、2020年にEOL(End of Life)を迎えたPython 2.7.18を2021年リリースの「macOS 12 Monterey」にも同梱するなどして開発者から批判されたため、
各macOS同梱のスクリプト言語のバージョン
| リリース日 | コードネーム | Version Build |
PHP | Python | Ruby | Perl |
|---|---|---|---|---|---|---|
| 2019年10月7日 | macOS Catalina |
10.15 Build 19A583 |
7.3.8 | 2.7.16 | 2.6.3p62 | 5.18.4 |
| 2020年11月12日 | macOS Big Sur |
11.0.1 Build 20B28 |
7.3.22 | 5.28.2 | ||
| 2021年10月25日 | macOS Monterey |
12.0.1 Build 21A559 |
廃止 | 2.7.18 | 2.6.8p205 | 5.30.3 |
| 2022年10月24日 | macOS Ventura |
13.0 Build 22A380 |
廃止 | 2.6.10p210 | 5.30.3 |
Appleは2021年10月にリリースしたmacOS 12.0 Montereyでようやく「php」のランタイムの同梱を廃止し、2022年10月にリリースしたmacOS 13 Venturaでは「Python」のランタイムの同梱が終了しましたが、それ以前のmacOSにはデフォルトで古いスクリプト言語のランタイムが残っています。

macOS 11 Big SurとmacOS 12 Montereyのphpコマンド
Appleは既にmacOS 11 Big Surのセキュリティサポートを2023年09月で終了しているため、現在も使用している方は少ないと思われますが、同時にphpのセキュリティアップデートも提供されず、PHP2Shellに脆弱なphpが残ったままとなっているので、macOS 11 Big Sur以前のmacOSでWebサーバーなどを運営されている方は注意して下さい。
おまけ
なお、PHP Development TeamはPHP2Shell脆弱性の深刻さを考慮してソースコードからビルドするユーザーやLTSベンダーを利用できないユーザーのために、PHP 7.4とPHP 8.0、PHP 8.1向けにも必要最小限の修正をバックポートして提供しています。

Given the severity of these vulnerabilities, the PHP security team provided minimal source-backports for PHP 7.4, PHP 8.0, and PHP 8.1
Security advisory: Critical remote code execution vulnerabilities, update now – PHP

コメント