CVE-2022-41725
概要

A denial of service is possible from excessive resource consumption in net/http and mime/multipart. Multipart form parsing with mime/multipart.Reader.ReadForm can consume largely unlimited amounts of memory and disk files. This also affects form parsing in the net/http package with the Request methods FormFile, FormValue, ParseMultipartForm, and PostFormValue. ReadForm takes a maxMemory parameter, and is documented as storing "up to maxMemory bytes +10MB (reserved for non-file parts) in memory". File parts which cannot be stored in memory are stored on disk in temporary files. The unconfigurable 10MB reserved for non-file parts is excessively large and can potentially open a denial of service vector on its own. However, ReadForm did not properly account for all memory consumed by a parsed form, such as map entry overhead, part names, and MIME headers, permitting a maliciously crafted form to consume well over 10MB. In addition, ReadForm contained no limit on the number of disk files created, permitting a relatively small request body to create a large number of disk temporary files. With fix, ReadForm now properly accounts for various forms of memory overhead, and should now stay within its documented limit of 10MB + maxMemory bytes of memory consumption. Users should still be aware that this limit is high and may still be hazardous. In addition, ReadForm now creates at most one on-disk temporary file, combining multiple form parts into a single temporary file. The mime/multipart.File interface type's documentation states, "If stored on disk, the File's underlying concrete type will be an *os.File.". This is no longer the case when a form contains more than one file part, due to this coalescing of parts into a single file. The previous behavior of using distinct files for each form part may be reenabled with the environment variable GODEBUG=multipartfiles=distinct. Users should be aware that multipart.ReadForm and the http.Request methods that call it do not limit the amount of disk consumed by temporary files. Callers can limit the size of form data with http.MaxBytesReader.

公表日 2023年3月1日3:15
登録日 2023年3月1日10:00
最終更新日 2024年11月21日16:23
CVSS3.1 : HIGH
スコア 7.5
ベクター CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
攻撃元区分(AV) ネットワーク
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR) 不要
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I) なし
可用性への影響(A)
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* 1.19.6
cpe:2.3:a:golang:go:1.20.0:rc3:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:rc2:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:rc1:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:-:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧

JVN脆弱性情報
The Go Project の Go における制限またはスロットリング無しのリソースの割り当てに関する脆弱性
タイトル The Go Project の Go における制限またはスロットリング無しのリソースの割り当てに関する脆弱性
概要

The Go Project の Go には、制限またはスロットリング無しのリソースの割り当てに関する脆弱性が存在します。

想定される影響 サービス運用妨害 (DoS) 状態にされる可能性があります。
対策

ベンダアドバイザリまたはパッチ情報が公開されています。参考情報を参照して適切な対策を実施してください。

公表日 2022年9月28日0:00
登録日 2023年11月2日15:34
最終更新日 2023年11月2日15:34
影響を受けるシステム
The Go Project
Go 1.19.6 未満
Go 1.20.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
変更履歴
No 変更内容 変更日
1 [2023年11月02日]   掲載 2023年11月2日15:34