CVE-2023-24536: Excessive resource consumption in net/http, net/textproto and mime/multipart

stdlib Updated 02 Oct 2025

Summary

05/04/2023
Yes i
Unrated
Not published

CVE-2023-24536: Excessive resource consumption in net/http, net/textproto and mime/multipart. Affects stdlib across 2 version ranges.

< 1.19.8 >= 1.20.0-0, < 1.20.3

Fixed in 1.19.8 or 1.20.3, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2023-24536 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The impacted package is the standard library package 'stdlib' in the Go ecosystem. This package provides a collection of modules and functions that are commonly used in Go programs. It includes the net/http, net/textproto, and mime/multipart packages, which are responsible for handling HTTP requests, parsing MIME headers, and processing multipart form data, respectively. These packages are widely used in Go applications for web development and data processing.

Vulnerability Detail

The vulnerability in the impacted package arises from the way multipart form parsing is handled. When processing form inputs with a large number of parts, it can lead to excessive consumption of CPU and memory resources. This is caused by several factors, including the undercounting of memory consumption by the mime/multipart.Reader.ReadForm function, the lack of accounting for increased garbage collector pressure from small allocations, and the allocation of numerous short-lived buffers. An attacker can exploit this vulnerability to launch a denial-of-service attack by causing the program to consume significant amounts of CPU and memory. The vulnerability affects programs that use mime/multipart.Reader.ReadForm and form parsing functions in the net/http package, such as FormFile, FormValue, ParseMultipartForm, and PostFormValue.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.19.8 1.19.8
    go get stdlib@v1.19.8
  • >= 1.20.0-0, < 1.20.3 1.20.3
    go get stdlib@v1.20.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If updating the impacted package is not immediately feasible, a possible workaround is to implement custom form parsing logic that avoids using the vulnerable functions. This can involve directly parsing the multipart form data using alternative libraries or implementing a custom parser. However, it is recommended to update to the fixed version of the impacted package as soon as possible.

Conclusion

In conclusion, the impacted package in the Go ecosystem is vulnerable to excessive resource consumption when parsing multipart forms. This can be exploited by an attacker to cause a denial-of-service condition. To address this vulnerability, it is crucial to update the impacted package to the fixed version and ensure the implementation of proper form parsing logic. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

The vulnerability affects versions of the impacted package prior to 1.19.8 for Go 1.19.x and prior to 1.20.3 for Go 1.20.x.

The vulnerability can be exploited by an attacker to cause a denial-of-service condition in programs that parse multipart forms. This can result in excessive consumption of CPU and memory resources, leading to degraded performance or unavailability of the affected application.

The recommended mitigation is to update the impacted package to the fixed version. Implementing custom form parsing logic or applying other workarounds may provide temporary relief but are not a substitute for the official fix.

Yes, this vulnerability can be exploited remotely by sending specially crafted multipart form data to the affected application's endpoints that utilize the vulnerable functions for form parsing.

At the time of this report, there is no known evidence of active exploits targeting this vulnerability. However, it is advisable to apply the fix promptly to mitigate any potential risks.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

How To Fix

Latest published version: go1.25.5 as of 22 Oct 2026

go get stdlib@vgo1.25.5

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 1.19.8 1.19.8
    go get stdlib@v1.19.8
  • >= 1.20.0-0, < 1.20.3 1.20.3
    go get stdlib@v1.20.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback