PHPの一覧に戻る

脆弱性の詳細

PHP:情報の漏えい

PHP 本体CVE-2026-6104重要度:中悪用状況:未確認修正版情報あり

PHPに情報の漏えいに関する脆弱性情報があります。影響を受ける条件を確認してください。

どんな危険?

本来公開しない情報を読み取られる可能性があります。

対象
PHP 8.4系 / ext-mbstring:< 8.4.21(修正版 8.4.21 に対応する系列。旧系列の影響は原文確認)PHP 8.5系 / ext-mbstring:< 8.5.6(修正版 8.5.6 に対応する系列。旧系列の影響は原文確認)
修正版
8.4.218.5.6

どうすればいい?

  1. 使っている製品名・バージョン・構成を、影響を受ける条件と照合してください。
  2. 公式の修正版を確認し、バックアップと動作確認のうえで更新してください。
  3. 更新後は稼働中のバージョンと動作を確認してください。管理を委託している場合は、提供元に対応状況を確認してください。
情報源の原文を確認

悪用状況の「未確認」は、悪用されていないことを意味しません。対策は製品・バージョン・利用条件によって異なります。適用前に情報源とご自身の環境を確認してください。

情報の出典と更新日時

原文と条件を確認

A global buffer over-read exists in `mbfl_name2encoding_ex()` (`ext/mbstring/libmbfl/mbfl/mbfl_encoding.c`, line 352), called from `mb_convert_encoding(...)` and other mbstring functions, when parsing encoding names with embedded NUL bytes. ## Root Cause In `mbfl_name2encoding_ex`, the MIME name search loop (line 352) uses: ```c if (strncasecmp((*encoding)->mime_name, name, name_len) == 0 && (*encoding)->mime_name[name_len] == '\0') { ``` When `name` contains an embedded NUL byte (e.g., `"UTF-8\x00AAAA..."`), `strncasecmp` returns 0 after matching up to the NUL (since both strings have NUL at the same position). The subsequent check `(*encoding)->mime_name[name_len]` then reads at offset `name_len` (e.g., 22) from `mime_name`, which is only 6 bytes long (`"UTF-8\0"`). This reads 16+ bytes past the end of the global string into adjacent global memory. The same issue exists on lines 362 for encoding aliases. ## Minimal Reproducer ```php <?php $encoding = "UTF-8\x00AAAAAAAAAAAAAAAA"; mb_convert_encoding('foo', $encoding, $encoding) ``` Running with ASan-instrumented PHP 8.4.20: ``` ==552769==ERROR: AddressSanitizer: global-buffer-overflow on address 0x... READ of size 1 #0 in mbfl_name2encoding_ex mbfl_encoding.c:352 #1 in php_mb_parse_encoding_list mbstring.c:350 #2 in zif_mb_convert_encoding mbstring.c:2865 ``` ## Attack Surface - Triggerable when a attacker-controlled encoding is passed to `mb_convert_encoding()` without sanitization - Also affected are `mb_detect_encoding()`, `mb_convert_variables()`, `mb_detect_order()`, as well as the `mbstring.detect_order` and `mbstring.http_output` INI settings. - Out-of-bounds read of global memory (CWE-125) - Information disclosure of adjacent global data; not directly exploitable for code execution ## Environment - PHP 8.4.0+, `-fsanitize=address,undefined`

この情報をAIに渡す

対象・リスク・対策・出典を同じ内容で取得

JSONを見る

このサービスを共有

脆弱性を確認する入口を、チームや知り合いに。

Xで共有