PHP 8.3.x < 8.3.12 多個弱點

critical Nessus Plugin ID 207821

概要

遠端 Web 伺服器上執行的 PHP 版本受到多個弱點影響。

說明

遠端主機上安裝的 PHP 版本為 8.3.12 之前的版本。因此,會受到版本 8.3.12 公告中所提及的多個弱點影響。

- 在 8.1.* 至 8.1.29、8.2.* 至 8.2.20、8.3.* 至 8.3.8 版本的 PHP 中,當在 Windows 上使用 Apache 和 PHP-CGI 時,如果系統設定為使用某些程式碼頁面,Windows 可能會使用 Best-Fit 行為來取代命令行中提供給 Win32 API 函式的字元。PHP CGI 模組可能會將這些字元錯誤解譯為 PHP 選項,其可允許惡意使用者將選項傳遞給正在執行的 PHP 二進位檔,因而洩漏指令碼的原始程式碼、在伺服器上執行任意 PHP 程式碼等等。(CVE-2024-4577)

- **PHP 版本 8.3.12** (2024 年 9 月 26 日) **CGI:** * 修正了錯誤 [GHSA-p99j-rfp4-xqvq](https://github.com/php/php-src/security/advisories/GHSA-p99j-rfp4-xqvq) (繞過 CVE-2024-4577,參數插入弱點)。(**CVE-2024-8926**) (nielsdos) * 修正了錯誤 [GHSA-94p6-54jq-9mwp](https://github.com/php/php-src/security/advisories/GHSA-94p6-54jq-9mwp) (cgi.force_redirect 設定可被繞過,因環境變數衝突所致)。
(**CVE-2024-8927**) (nielsdos) **核心:** * 修正了錯誤 [GH-15408](https://github.com/php/php-src/issues/15408) (zend_max_execution_timer 上的 MSan 誤報)。(zeriyoshi) * 修正了錯誤 [GH-15515](https://github.com/php/php-src/issues/15515) (設定錯誤 grep 非法選項 q)。(Peter Kokot) * 修正了錯誤 [GH-15514](https://github.com/php/php-src/issues/15514) (設定錯誤:genif.sh:
語法錯誤)。(Peter Kokot) * 修正了錯誤 [GH-15565](https://github.com/php/php-src/issues/15565) (編譯期間的 --disable-ipv6 產生找不到 EAI_SYSTEM 錯誤)。(nielsdos) * 修正了錯誤 [GH-15587](https://github.com/php/php-src/issues/15587) (arm 32 位元上的 CRC32 API 構建錯誤)。(Bernd Kuhls、Thomas Petazzoni) * 修正了錯誤 [GH-15330](https://github.com/php/php-src/issues/15330) (無法多次掃描產生器框架)。(Arnaud) * 修正了內部列舉常數 AST 中未初始化的 lineno。
(ilutov) **Curl:** * 修正了錯誤 [GH-15547](https://github.com/php/php-src/issues/15547) (逾時引數上的 curl_multi_select 溢位)。(David Carlier) **DOM:** * 修正了錯誤 [GH-15551](https://github.com/php/php-src/issues/15551) (ext/dom/xml_common.h 中的分割錯誤 (存取 null 指標))。(nielsdos) * 修正了錯誤 [GH-15654](https://github.com/php/php-src/issues/15654) (ext/dom/nodelist.c 中的帶正負號整數溢位)。(nielsdos) **Fileinfo:** * 修正了錯誤 [GH-15752](https://github.com/php/php-src/issues/15752) (檔案名稱引數為空白的 finfo_file 出現錯誤訊息不正確的問題)。(DanielEScherzer) **FPM:** * 修正了錯誤 [GHSA-865w-9rf3-2wh5](https://github.com/php/php-src/security/advisories/GHSA-865w-9rf3-2wh5) (來自子項目的記錄可能會變更)。(**CVE-2024-9026**) (Jakub Zelenka) **MySQLnd:** * 修正了錯誤 [GH-15432](https://github.com/php/php-src/issues/15432) (查詢向量時發生堆積損毀)。(cmb、Kamil Tekiela) **Opcache:** * 修正了錯誤 [GH-15661](https://github.com/php/php-src/issues/15661) (存取 Zend/Optimizer/zend_inference.c 中的 null 指標)。(nielsdos) * 修正了錯誤 [GH-15658](https://github.com/php/php-src/issues/15658) (Zend/zend_vm_execute.h 中的分割錯誤)。
(nielsdos) **SAPI:** * 修正了錯誤 [GHSA-9pqp-7h25-4f32](https://github.com/php/php-src/security/advisories/GHSA-9pqp-7h25-4f32) (錯誤剖析多部分錶單資料)。
(**CVE-2024-8925**) (Arnaud) **Standard:** * 修正了錯誤 [GH-15552](https://github.com/php/php-src/issues/15552) (ext/standard/scanf.c 中的帶正負號整數溢位)。(cmb) **Streams:** * 修正了錯誤 [GH-15628](https://github.com/php/php-src/issues/15628) (php_stream_memory_get_buffer() 未以零結尾)。(cmb) (CVE-2024-8925、CVE-2024-8926、CVE-2024-8927、CVE-2024-9026)

請注意,Nessus 並未測試這些問題,而是僅依據應用程式自我報告的版本號碼作出判斷。

解決方案

升級至 PHP 8.3.12 版或更新版本。

另請參閱

http://php.net/ChangeLog-8.php#8.3.12

https://github.com/php/php-src/security/advisories/GHSA-865w-9rf3-2wh5

https://github.com/php/php-src/security/advisories/GHSA-94p6-54jq-9mwp

https://github.com/php/php-src/security/advisories/GHSA-9pqp-7h25-4f32

https://github.com/php/php-src/security/advisories/GHSA-p99j-rfp4-xqvq

Plugin 詳細資訊

嚴重性: Critical

ID: 207821

檔案名稱: php_8_3_12.nasl

版本: 1.4

類型: remote

系列: CGI abuses

已發布: 2024/9/26

已更新: 2024/10/4

組態: 啟用徹底檢查

支援的感應器: Nessus

Enable CGI Scanning: true

風險資訊

VPR

風險因素: Critical

分數: 9.6

CVSS v2

風險因素: Critical

基本分數: 10

時間分數: 8.7

媒介: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS 評分資料來源: CVE-2024-4577

CVSS v3

風險因素: Critical

基本分數: 9.8

時間分數: 9.4

媒介: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

時間媒介: CVSS:3.0/E:H/RL:O/RC:C

弱點資訊

CPE: cpe:/a:php:php

必要的 KB 項目: www/PHP, installed_sw/PHP

可被惡意程式利用: true

可輕鬆利用: Exploits are available

修補程式發佈日期: 2024/9/26

弱點發布日期: 2024/6/4

CISA 已知遭惡意利用弱點到期日: 2024/7/3

可惡意利用

Metasploit (PHP CGI Argument Injection Remote Code Execution)

參考資訊

CVE: CVE-2024-4577, CVE-2024-8925, CVE-2024-8926, CVE-2024-8927, CVE-2024-9026

IAVA: 2024-A-0609