CVE-2023-24536
Excessive resource consumption in net/http, net/textproto and mime/multipart
Check your servers for CVE-2023-24536
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-24536 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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=.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.47%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 74.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 12 Feb 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-770 Allocation of Resources Without Limits or Throttling
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
mime/multipart
package
mime/multipart |
affected before 1.19.8 affected from 1.20.0-0, before 1.20.3
Other versions: unaffected
|
|
net/textproto
package
net/textproto |
affected before 1.19.8 affected from 1.20.0-0, before 1.20.3
Other versions: unaffected
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-24536 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-24536RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-24536Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-24536
trivy image --scanners vuln IMAGE | grep CVE-2023-24536
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://go.dev/issue/59153 go.dev
- https://go.dev/cl/482076 go.dev
- https://go.dev/cl/482075 go.dev
- https://go.dev/cl/482077 go.dev
- https://groups.google.com/g/golang-announce/c/Xdv6JL9ENs8 groups.google.com
- https://pkg.go.dev/vuln/GO-2023-1705 pkg.go.dev
- https://security.netapp.com/advisory/ntap-20230526-0007/ security.netapp.com
- https://security.gentoo.org/glsa/202311-09 security.gentoo.org
Source: the record CVE-2023-24536 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse