CVE-2023-45290
Assigner: Go
Published: 2024-03-05T22:22:28.703Z
State: PUBLISHED
title: Memory exhaustion in multipart form parsing in net/textproto and net/http
descriptions: value: When parsing a multipart form (either explicitly with Request.ParseMultipartForm or implicitly with Request.FormValue, Request.PostFormValue, or Request.FormFile), limits on the total size of the parsed form were not applied to the memory consumed while reading a single form line. This permits a maliciously crafted input containing very long lines to cause allocation of arbitrarily large amounts of memory, potentially leading to memory exhaustion. With fix, the ParseMultipartForm function now correctly limits the maximum size of form lines.
affected: vendor: Go standard library
product: net/textproto
collectionURL: https://pkg.go.dev
packageName: net/textproto
versions: version: 0
lessThan: 1.21.8
status: affected
versionType: semver
version: 1.22.0-0
lessThan: 1.22.1
status: affected
versionType: semver
programRoutines: Reader.readLineSlice
Reader.readContinuedLineSlice
Reader.ReadCodeLine
Reader.ReadContinuedLine
Reader.ReadContinuedLineBytes
Reader.ReadDotLines
Reader.ReadLine
Reader.ReadLineBytes
Reader.ReadMIMEHeader
Reader.ReadResponse
defaultStatus: unaffected
problemTypes: descriptions: description: CWE-400: Uncontrolled Resource Consumption
credits: value: Bartek Nowotarski