NVD Vulnerability Detail
Search Exploit, PoC
CVE-2022-41725
Summary

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.

Publication Date March 1, 2023, 3:15 a.m.
Registration Date March 1, 2023, 10 a.m.
Last Update Nov. 21, 2024, 4:23 p.m.
CVSS3.1 : HIGH
スコア 7.5
Vector 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)
Affected software configurations
Configuration1 or higher or less more than less than
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:-:*:*:*:*:*:*
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
The Go Project の Go における制限またはスロットリング無しのリソースの割り当てに関する脆弱性
Title The Go Project の Go における制限またはスロットリング無しのリソースの割り当てに関する脆弱性
Summary

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

Possible impacts サービス運用妨害 (DoS) 状態にされる可能性があります。
Solution

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

Publication Date Sept. 28, 2022, midnight
Registration Date Nov. 2, 2023, 3:34 p.m.
Last Update Nov. 2, 2023, 3:34 p.m.
Affected System
The Go Project
Go 1.19.6 未満
Go 1.20.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
その他
Change Log
No Changed Details Date of change
1 [2023年11月02日]   掲載 Nov. 2, 2023, 3:34 p.m.