VDB

CVE-2023-24536

CVE-2023-24536 PUBLISHED CVSS 7.5 HIGH

Excessive resource consumption in net/http, net/textproto and mime/multipart

Reported by go · Published April 6, 2023

net/textproto is fixed in 1.20.3 and 1.19.8 (Go Modules)

Multipart form parsing can consume large amounts of CPU and memory when processing form inputs containing very large numbers of parts. This stems from several causes: 1. mime/multipart.Reader.ReadForm limits the total memory a parsed multipart form can consume. ReadForm can undercount the amount of memory consumed, leading it to accept larger inputs than intended. 2. Limiting total memory does not account for increased pressure on the garbage collector from large numbers of small allocations in forms with many parts. 3. ReadForm can allocate a large number of short-lived buffers, further increasing pressure on the garbage collector. The combination of these factors can permit an attacker to cause an program that parses multipart forms to consume large amounts of CPU and memory, potentially resulting in a denial of service. This affects programs that use mime/multipart.Reader.ReadForm, as well as form parsing in the net/http package with the Request methods FormFile, FormValue, ParseMultipartForm, and PostFormValue. With fix, ReadForm now does a better job of estimating the memory consumption of parsed forms, and performs many fewer short-lived allocations. In addition, the fixed mime/multipart.Reader imposes the following limits on the size of parsed forms: 1. Forms parsed with ReadForm may contain no more than 1000 parts. This limit may be adjusted with the environment variable GODEBUG=multipartmaxparts=. 2. Form parts parsed with NextPart and NextRawPart may contain no more than 10,000 header fields. In addition, forms parsed with ReadForm may contain no more than 10,000 header fields across all parts. This limit may be adjusted with the environment variable GODEBUG=multipartmaxheaders=.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
net/textprotoGo Modules1.20.3, 1.19.8
mime/multipartGo Modules1.20.3, 1.19.8
stdlibGo Modules1.20.3, 1.19.8
golang-srcAmazon Linux1.20.5-1.amzn2.0.2, 1.19.8-1.amzn2023.0.1
golang-binAmazon Linux1.20.5-1.amzn2.0.2, 1.19.8-1.amzn2023.0.1
golang-testsAmazon Linux1.20.5-1.amzn2.0.2, 1.19.8-1.amzn2023.0.1
falcoWolfi0.37.1-r0
go-fips-1.20Wolfi1.20.3-r1
go-1.19Wolfi1.19.8-r0
golangAmazon Linux1.20.5-1.amzn2.0.2, 1.19.8-1.amzn2023.0.1
golang-sharedAmazon Linux1.20.5-1.amzn2.0.2, 1.19.8-1.amzn2023.0.1
kubeflow-katibWolfi0.19.0-r40, 0.19.0-r31

13 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
Go standard librarymime/multipart0, 1.20.0-0
Go standard librarynet/textproto0, 1.20.0-0
amazon:2023golang-src0
amazon:2golang-bin0
Go standard librarynet/textproto1.20.0-0, 0
amazon:2023golang-bin0
amazon:2023golang-tests0
wolfifalco0
wolfigo-fips-1.200
wolfigo-1.190
amazon:2golang0
amazon:2golang-shared0
amazon:2023golang0
golanggo
wolfikubeflow-katib0, 0
alpinego0, 0
amazon:2golang-src0
Go standard librarymime/multipart0, 1.20.0-0
wolfigo-1.200
chainguardkubeflow-katib0, 0

…and 11 more

Timeline

  • Apr 5, 2023 CVE Published
  • Apr 7, 2023 EPSS Score (30 in total, the first dated here)
  • Feb 20, 2026 Security Advisory (58 in total, the first dated here)
  • Feb 20, 2026 CVE Updated
  • Mar 21, 2026 Distribution Patch (55 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2023-24536
vulnetix vdb fixes CVE-2023-24536

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-24536/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›