PHP2Shell
PHP2Shell 是 2026 年公開的兩項 PHP 高危漏洞的合稱,編號分別為 CVE-2026-109618 和 CVE-2026-109619。兩者都是 PHP 解釋器中的內存安全問題,影響 PHP 5.4 至 8.5 版本,可導致遠程代碼執行(RCE)。PHP 是使用最廣泛的伺服器端程式語言之一,這兩項漏洞在公開時被認為可能影響全球約七成的網站。
CaelLab 的 Phabricator 在漏洞修補前暫停服務的公告 | |
| 類型 | 計算機安全漏洞 |
|---|---|
| CVE 編號 | CVE-2026-109618、CVE-2026-109619 |
| CVSS 評分 | 9.2(CVSS 4.0,嚴重) |
| 發現日期 | 2026年8月 |
| 公開日期 | 2026年10月20日 |
| 修補日期 | 2026年10月21日 |
| 發現者 | Calif、OpenAI、Wiz |
| 影響軟體 | PHP 5.4 至 8.5 |
| 網站 | php2shell.com |
漏洞由美國安全公司 Calif 的研究者藉助人工智慧發現,以色列與美國的雲安全公司 Wiz 也獨立發現了同樣的問題。PHP 維護團隊於 2026 年 10 月 20 日提前公布消息,次日在發布緊急補丁的同時公開了漏洞細節[1][2]。由於影響範圍大,多國網絡安全機構建議無法立即更新的機構將網站臨時下線,維基媒體基金會、網際網路檔案館等網站以及日本多家網絡服務在修補期間暫停了服務[3][4][5]。
背景
PHP 5.4 於 2012 年發布,這兩項漏洞從那時起便存在於 PHP 的原始碼中[6]。內存安全方面的問題在更早的時候就有人指出,但當時認為實際利用並不可行,因此沒有採取行動[7][8]。2024 年,一名 PHP 核心開發者在安全審計中發現了其中一個漏洞背後的內存耗盡(out-of-memory)錯誤,但開發團隊未能就修複方式達成一致,加上當時還沒有已知的利用方法,問題被擱置[9][10]。
PHP 廣泛用於內容管理系統和各類網站後台,也隨部分主機控制面板和設備一起分發[11]。根據 W3Techs 的統計,在能識別伺服器端編程語言的網站中,約 69% 使用 PHP[12]。
發現
兩項漏洞由兩方獨立發現。2026 年 8 月,Calif 的研究者 Ryan Austin 在源碼審計中藉助 OpenAI 的 GPT-5.6 Sol 模型發現了它們,這項工作屬於 OpenAI 的「Patch the Planet」項目[8][13]。Wiz 的研究者使用 Gemini 4 Argon、GPT-5.6 Sol 以及自研的 Wiz Atlas 工具,獨立得到了相同的結果[4]。「PHP2Shell」這個名字由 Wiz 提出,意指攻擊者可以藉此在受影響的伺服器上執行 shellcode[14]。
PHP 開發者依照通用漏洞評分系統(CVSS)4.0 版將漏洞評為 9.2 分,屬於「嚴重」等級;安全公司 watchTowr 則給出了滿分 10.0 的評價[15][16]。
漏洞
CVE-2026-109618 與內存耗盡時的狀態損壞有關,CVE-2026-109619 則與跨請求殘留的全局狀態有關,兩者都可能導致遠程代碼執行[17][18]。按 CVSS 3.1 計算,兩項漏洞的評分分別為 9.8 和 8.1;按 CVSS 4.0 計算則均為 9.2[17][18]。
漏洞位於 PHP 解釋器本身,因此受影響的不僅是調用特定函數的應用,還包括以常見方式運行 PHP 的伺服器[19]。除 PHP 8.2、8.3、8.4、8.5 外,7.4、8.0、8.1 等已停止支持的版本同樣受這些問題影響[2]。
修補
PHP 維護團隊發布了 PHP 8.2.35、8.3.36、8.4.27 和 8.5.12,分別對應 8.2、8.3、8.4、8.5 四個分支[2]。對於已經終止支持的 PHP 7.4、8.0 和 8.1,官方只提供了原始碼補丁,沒有發布更新後的二進制文件[2]。官方同時給出了一些臨時緩解措施,但表示沒有一種措施能完全消除風險,升級到修補版本是唯一安全的選擇[2]。
兩項漏洞的安全公告於 2026 年 10 月 21 日 13 時 34 分(UTC)通過 GitHub 發布,比原定的 14 時提前了 26 分鐘,PHP 官網隨後更新[20][17][18]。主機控制面板 cPanel 和 CloudLinux 在各自的軟體源中提供了回移補丁[21][22];志願維護者 Ondřej Surý 提前拿到了修復代碼,並為舊版本準備了可以直接安裝的軟體包,使管理員不必自行編譯 PHP[23][24]。
提前披露
PHP 維護團隊之所以提前公布消息,是因為漏洞信息在 10 月 20 日已經外洩,渠道包括 Hacker News 上的匿名帖、watchTowr 在 X 上的帖子,以及 Calif 誤發的一段概念驗證利用視頻[25][8][9]。PHP.net 的提前公告呼籲使用者做好準備,在補丁發布後立即更新[2]。安全公司 Sansec 當時預計,「大規模攻擊會在補丁發布後 15 分鐘內開始」[26]。在保密期限結束前,網絡上已經開始流傳概念驗證代碼、技術分析和部分緩解措施,原因是開發平台 Chainguard 提前發布了修補後的版本,攻擊者因此可以比對出修改了哪些代碼[16][9]。
影響
PHP 在網站中的普遍使用,使這兩項漏洞的潛在影響範圍很廣。除內容管理系統外,PHP 也隨部分廠商設備、虛擬主機管理面板和 Windows 應用程式分發[11]。
根據歐盟電腦緊急應變小組(CERT-EU)和英國國家網絡安全中心(NCSC)的建議,歐洲多國機構在等待補丁期間預防性地將網站下線,包括荷蘭政府門戶 Overheid.nl、丹麥全國學校通訊平台、芬蘭政府的全部對外網絡服務,以及法國內政部下屬地方行政機關的網站[4][27]。美國國家安全局建議,無法立即更新的網站應考慮暫時下線[7][28];英國 NCSC 也發出類似警告,提醒各機構留意後門風險[29]。日本國家網絡安全辦公室建議 PHP 用戶立即更新系統[5]。加拿大政府部分網站依據加拿大網絡安全中心的指引臨時下線[30],新加坡網絡安全局也敦促當地機構儘快修補[31][32]。
維基媒體基金會關閉了多個支持服務,論壇網站 4chan 和 Something Awful 也暫時下線[3][33];網際網路檔案館曾短暫停止服務以處理相關問題[34]。日本多家網站和在線服務因應這次漏洞進行緊急維護,包括托育機構管理系統 CoDMON、SAKURA internet 的租用伺服器、網店平台 BASE、視頻分享網站 Niconico、創作社區 pixiv,以及《賽馬娘 Pretty Derby》《Shadowverse: Worlds Beyond》等遊戲[5][35]。
漏洞利用
亞馬遜威脅情報團隊在 MadPot 遙測數據中發現,早在 2026 年 10 月 17 日,也就是公開披露前四天,就已經出現了針對 PHP2Shell 的利用嘗試[36]。Cloudflare 表示在補丁發布前就觀察到了早期利用跡象,並部署了臨時的網頁應用防火牆(WAF)規則作為過渡措施[37]。watchTowr 稱其蜜罐網絡到 10 月 21 日已觀察到實際環境中的利用活動,而美國網絡安全和基礎設施安全局(CISA)則表示截至同日尚未觀察到漏洞被利用[38][3]。
10 月 25 日,安全研究員 Jaydip Modhwadia 在一項名為「Steal My Bitcoin」的在線安全挑戰中,利用 PHP2Shell 在運行未修補版本 PHP 的伺服器上取得了遠程代碼執行權限,證明該漏洞在特定條件下確實可以被利用[39]。
評價
Wiz 的研究者認為,這次事件的影響可與 2014 年的心臟出血漏洞相比:當年的漏洞影響 OpenSSL,而當時約三分之二的網站使用這一加密庫[40]。《紐約時報》稱 PHP 的使用「無處不在」,並推測普通用戶的個人數據也可能面臨風險[41]。《衛報》的評論指出,維護 PHP 的 PHP 基金會只有 13 名全職和兼職員工,主要依靠捐款運作,而協助發現漏洞的人工智慧研究獲得了「數十億」美元的投資[42]。
參考文獻
- ↑ PHP: News Archive - 20 Oct 2026. www.php.net. 2026-10-20 [2026-11-19] (English).
- ↑ 2.0 2.1 2.2 2.3 2.4 2.5 PHP: News Archive - 21 Oct 2026. www.php.net. 2026-10-21 [2026-11-19] (English).
- ↑ 3.0 3.1 3.2 Collier, Kevin. Critical vulnerabilities in commonly used web code spark rush to update systems. NBC News. 2026-10-21 [2026-11-19] (English).
- ↑ 4.0 4.1 4.2 Satter, Raphael; Marchandon, Leo; Ghosh, Kanjyik; Pardesi, Rajveer. Government websites go dark after AI-discovered flaw sparks security scramble. Reuters. 2026-10-21 [2026-11-19] (English).
- ↑ 5.0 5.1 5.2 著名ITサービス相次いで緊急メンテへ コドモン、シャドバ、BASE、さくらのレンタルサーバなど 「PHP」脆弱性に起因か. ITmedia. 2026-10-21 [2026-11-19] (日本語).
- ↑ PHP: Releases. www.php.net. [2026-11-19] (English).
- ↑ 7.0 7.1 Kan, Michael. This Flaw Is So Serious Websites Should Consider Going Offline, NSA Says. PCMag. 2026-10-21 [2026-11-19] (English).
- ↑ 8.0 8.1 8.2 McMillan, Robert. Exclusive: AI Just Found a Bug That Puts up to 70% of the World's Websites at Risk. The Wall Street Journal. 2026-10-21 [2026-11-19] (English).
- ↑ 9.0 9.1 9.2 Constantin, Ana Maria. PHP knew about one of the flaws in 2024 but could not agree a fix. The Next Web. 2026-10-21 [2026-11-19] (English).
- ↑ Today's PHP Security Release, and How We're Strengthening PHP Security. The PHP Foundation. 2026-10-21 [2026-11-19] (English).
- ↑ 11.0 11.1 Hammond, John. Rapid Response: php2shell, Leaked Critical PHP Vulnerabilities (CVE-2026-109618 & CVE-2026-109619). Huntress. 2026-10-21 [2026-11-19] (English).
- ↑ Usage statistics of PHP for websites. W3Techs. [2026-11-19] (English).
- ↑ Volz, Dustin. A Hacking Tool Built With A.I. Can Breach Phones Without a Click. The New York Times. 2026-09-08 [2026-11-19] (English).
- ↑ PHP2Shell Exploitation: Two Critical PHP Flaws Explained. Recorded Future. [2026-11-19] (English).
- ↑ php.announce: [ANNOUNCE] Upcoming Critical PHP Security Release. PHP Mailing Lists. [2026-11-19] (English).
- ↑ 16.0 16.1 Abrams, Lawrence. PHP warns admins of two critical flaws, emergency patches coming tomorrow. BleepingComputer. 2026-10-20 [2026-11-19] (English).
- ↑ 17.0 17.1 17.2 RCE via OOM corruption. GitHub. 2026-10-21 [2026-11-19] (English).
- ↑ 18.0 18.1 18.2 RCE via stale global state. GitHub. 2026-10-21 [2026-11-19] (English).
- ↑ PHP2Shell: AI uncovers critical RCE vulnerabilities affecting 70% of the Internet. Wiz Blog. 2026-10-21 [2026-11-19] (English).
- ↑ Scherzer, Daniel. Blog: PHP2Shell: a Timeline. scherzer.dev. 2026-10-22 [2026-11-19] (English).
- ↑ Critical PHP Security Release - CVE-2026-109618 and CVE-2026-109619. cPanel. 2026-10-22 [2026-11-19] (English).
- ↑ Galov, Niko. PHP CVE-2026-109618 and CVE-2026-109619: CloudLinux Package Status and Imunify360 Protection. CloudLinux. 2026-10-21 [2026-11-19] (English).
- ↑ The PHP developer who became the unsung hero of the internet. BBC News. 2026-10-24 [2026-11-19] (English).
- ↑ Warzel, Charlie. 'If Anything Happens to This Guy ... Everyone Is Screwed'. The Atlantic. 2026-10-22 [2026-11-19] (English).
- ↑ Tell HN: 2x PHP RCE CVEs with CVSS 10.0 Incoming. Hacker News. 2026-10-20 [2026-11-19] (English).
- ↑ Goodin, Dan. PHP warns it plans to release 2 emergency patches imminently. Ars Technica. 2026-10-20 [2026-11-19] (English).
- ↑ Gerkin, Tom. Websites taken down worldwide as critical PHP cyber-security update issued. BBC News. 2026-10-21 [2026-11-19] (English).
- ↑ NSA Advisory: PHP Updates. National Security Agency. 2026-10-21 [2026-11-19] (English).
- ↑ Booth, Robert; Down, Aisha. Flaw in PHP computer language leads to shutdown of websites around world. The Guardian. 2026-10-21 [2026-11-19] (English).
- ↑ Beauchemin, Genevieve. Canadian apps and government websites go offline to ward off online danger. CP24. 2026-10-22 [2026-11-19] (English).
- ↑ Singapore organisations urged to patch critical PHP flaws immediately amid cyberattack threat. CNA. 2026-10-22 [2026-11-19] (English).
- ↑ Critical Vulnerabilities in PHP (PHP2Shell). Cyber Security Agency of Singapore. 2026-10-21 [2026-11-19] (English).
- ↑ Tauber, Olivia. PHP vulnerability: Which websites and services are affected?. Mashable. 2026-10-21 [2026-11-19] (English).
- ↑ Smith, Paul; Mizen, Ronald. AI just discovered a bug putting 70pc of world's websites at risk. Australian Financial Review. 2026-10-21 [2026-11-19] (English).
- ↑ Scullion, Chris. Capcom has temporarily delisted Street Fighter 5 and turned off its servers as it works on PHP security issue. Video Games Chronicle. 2026-10-27 [2026-11-19] (English).
- ↑ Amazon Threat Intelligence identifies PHP2Shell exploitation prior to public disclosure in MadPot. AWS Security Blog. 2026-10-21 [2026-11-19] (English).
- ↑ Gatlan, Sergiu. PHP ships emergency patches for critical PHP2Shell flaws. BleepingComputer. 2026-10-21 [2026-11-19] (English).
- ↑ PHP RCE FAQ: PHP2Shell CVE-2026-109618 & CVE-2026-109619. watchTowr. 2026-10-20 [2026-11-19] (English).
- ↑ UK pentester 'killa' claims $2K Bitcoin prize in PHP2Shell capture-the-flag contest. The Register. 2026-10-26 [2026-11-19] (English).
- ↑ Eadicicco, Lisa. Global websites shut down after AI found a critical flaw affecting 70% of the internet. CNN. 2026-10-21 [2026-11-19] (English).
- ↑ Adam, Karla; Volz, Dustin. What Is PHP? Why Are Government and Business Websites Going Offline?. The New York Times. 2026-10-22 [2026-11-19] (English).
- ↑ Taylor, Josh. What is PHP, and how bad is the computer language flaw causing website shutdowns globally?. The Guardian. 2026-10-22 [2026-11-19] (English).