Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

nvd логотип

CVE-2022-41725

Опубликовано: 28 фев. 2023
Источник: nvd
CVSS3: 7.5
EPSS Низкий

Уязвимость DoS атаки через избыточное потребление ресурсов в пакетах "net/http" и "mime/multipart"

Описание

В пакетах net/http и mime/multipart реализована возможность DoS атаки через избыточное потребление ресурсов. При разборе multipart форм с помощью метода mime/multipart.Reader.ReadForm может потребляться практически неограниченное количество памяти и файлов на диске. Это также затрагивает парсинг форм в пакете net/http с методами Request: FormFile, FormValue, ParseMultipartForm и PostFormValue. Метод ReadForm принимает параметр maxMemory и заявлено, что он хранит "до maxMemory байт +10MB (зарезервированы для частей без файлов) в памяти". Части файлов, которые не могут быть сохранены в памяти, сохраняются на диске во временных файлах. Неконфигурируемый резерв в 10MB для частей без файлов чрезмерно велик и сам по себе может открыть вектор для DoS атаки. Однако, метод ReadForm некорректно учитывает всю память, потребляемую разобранной формой, включая такие элементы, как накладные расходы на запись в карту (map entry overhead), имена частей и MIME заголовки, что позволяет вредоносно сформированной форме потреблять значительно больше 10MB. Кроме того, в ReadForm отсутствует ограничение на количество файлов, создаваемых на диске.

Тип уязвимости

DoS атака

Уязвимые конфигурации

Конфигурация 1

Одно из

cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Версия до 1.19.6 (исключая)
cpe:2.3:a:golang:go:1.20.0:-:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:rc1:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:rc2:*:*:*:*:*:*
cpe:2.3:a:golang:go:1.20.0:rc3:*:*:*:*:*:*

EPSS

Процентиль: 16%
0.00051
Низкий

7.5 High

CVSS3

Дефекты

CWE-770

Связанные уязвимости

CVSS3: 7.5
ubuntu
больше 2 лет назад

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...

CVSS3: 7.5
redhat
больше 2 лет назад

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...

CVSS3: 7.5
debian
больше 2 лет назад

A denial of service is possible from excessive resource consumption in ...

CVSS3: 7.5
github
больше 2 лет назад

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...

CVSS3: 7.3
fstec
около 2 лет назад

Уязвимость библиотек net/http и mime/multipart средства разработки GoLang, используемых в прикладном программном обеспечении ППО "Аврора Центр", позволяющая нарушителю выполнить атаку типа "отказ в обслуживании

EPSS

Процентиль: 16%
0.00051
Низкий

7.5 High

CVSS3

Дефекты

CWE-770