| Title | 7-Zipにおける複数の脆弱性 |
|---|---|
| Summary | 7-Zipは高い圧縮率を持つファイルアーカイバです。バージョン26.00以前には、NTFS圧縮ストリームバッファの過小割り当て(GetCuSizeのシフトによる未定義動作)に起因するヒープバッファオーバーフローの脆弱性が存在し、攻撃者が任意のコードを実行したりアプリケーションをクラッシュさせたりする可能性がありました。NTFSハンドラ内のCInStream::GetCuSize()は、圧縮単位バッファのサイズを(UInt32)1 (BlockSizeLog + CompressionUnit)として計算します。ClusterSizeLogが28以上かつCompressionUnitが4の細工されたイメージは指数を32に設定しており、これは未定義動作でありx86/x64環境上で異常動作を引き起こし、_inBufが1バイトで割り当てられます。ReadStream_FALSEはその1バイトのバッファに最大256MBの攻撃者制御データを64KBずつ書き込みます。CInStreamオブジェクトが_inBufのわずか304バイト後ろにあるため、そのvtableポインタが上書きされ、次に呼び出される関数呼び出しでvtableの乗っ取りが実現します。32ビットビルドでは無条件にオーバーフローが発生します。64ビットでは並行して8GBの_outBuf割り当てが成功する必要があり、そうでなければサービス拒否に繋がります。NTFSハンドラは標準の7z.dllでデフォルトで有効になっており、シグネチャベースのフォールバックマッチ「NTFS 」がオフセット3で検出されることで、拡張子に関係なく細工されたイメージを解凍やテスト時に開きます。バージョン26.01でこの問題は修正されました。 |
| Possible impacts | ・当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 ・当該ソフトウェアが完全に停止する可能性があります。 |
| Solution | ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | June 5, 2026, midnight |
| Registration Date | June 9, 2026, 2:13 p.m. |
| Last Update | June 9, 2026, 2:13 p.m. |
| CVSS3.0 : 重要 | |
| Score | 8.8 |
|---|---|
| Vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 7-Zip |
| 7-Zip 26.01 未満 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年06月09日] 掲載 |
June 9, 2026, 2:13 p.m. |
| Summary | 7-Zip is a file archiver with a high compression ratio. Versions 26.00 and prior contain a heap buffer overflow vulnerability caused by an under-allocation in the NTFS compressed stream buffer (GetCuSize shift UB), potentially allowing attackers to cause arbitrary code execution or application crashes. CInStream::GetCuSize() in the NTFS handler computes the compression-unit buffer size as (UInt32)1 << (BlockSizeLog + CompressionUnit), and a crafted image with ClusterSizeLog >= 28 and CompressionUnit == 4 drives the exponent to 32, which is undefined behavior and collapses on x86/x64 so _inBuf is allocated as 1 byte. ReadStream_FALSE then writes up to 256 MB of attacker-controlled data into that 1-byte buffer in 64 KB iterations, and because the CInStream object sits only 304 bytes after _inBuf, its vtable pointer is overwritten and the next dispatched call achieves a vtable hijack. On 32-bit builds the overflow is unconditionally reached; on 64-bit it requires the parallel 8 GB _outBuf allocation to succeed, otherwise failing closed to denial of service. The NTFS handler is enabled by default in stock 7z.dll and, via signature-based fallback matching "NTFS " at offset 3, will open a crafted image regardless of file extension during extraction or testing. Version 26.01 fixes the issue. |
|---|---|
| Publication Date | June 6, 2026, 12:16 a.m. |
| Registration Date | June 6, 2026, 4:17 a.m. |
| Last Update | June 8, 2026, 10:40 p.m. |
| Configuration1 | or higher | or less | more than | less than | |
| cpe:2.3:a:7-zip:7-zip:*:*:*:*:*:*:*:* | 26.01 | ||||