7.5
HIGH
CVE-2022-41725
Go net/http and mime/multipart Denial of Service Vulnerability
Description

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 created, permitting a relatively small request body to create a large number of disk temporary files. With fix, ReadForm now properly accounts for various forms of memory overhead, and should now stay within its documented limit of 10MB + maxMemory bytes of memory consumption. Users should still be aware that this limit is high and may still be hazardous. In addition, ReadForm now creates at most one on-disk temporary file, combining multiple form parts into a single temporary file. The mime/multipart.File interface type's documentation states, "If stored on disk, the File's underlying concrete type will be an *os.File.". This is no longer the case when a form contains more than one file part, due to this coalescing of parts into a single file. The previous behavior of using distinct files for each form part may be reenabled with the environment variable GODEBUG=multipartfiles=distinct. Users should be aware that multipart.ReadForm and the http.Request methods that call it do not limit the amount of disk consumed by temporary files. Callers can limit the size of form data with http.MaxBytesReader.

INFO

Published Date :

Feb. 28, 2023, 6:15 p.m.

Last Modified :

Nov. 25, 2023, 11:15 a.m.

Remotely Exploitable :

Yes !

Impact Score :

3.6

Exploitability Score :

3.9
Public PoC/Exploit Available at Github

CVE-2022-41725 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2022-41725 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Golang go
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-41725.

URL Resource
https://go.dev/cl/468124 Patch Release Notes
https://go.dev/issue/58006 Issue Tracking Patch Vendor Advisory
https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E Mailing List Vendor Advisory
https://pkg.go.dev/vuln/GO-2023-1569 Vendor Advisory
https://security.gentoo.org/glsa/202311-09

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Updated: 4 weeks ago
0 stars 0 fork 0 watcher
Born at : July 5, 2024, 2:18 p.m. This repo has been linked 40 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-41725 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-41725 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 25, 2023

    Action Type Old Value New Value
    Added Reference Go Project https://security.gentoo.org/glsa/202311-09 [No types assigned]
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Removed CWE Go Project CWE-400
  • Reanalysis by [email protected]

    Jul. 10, 2023

    Action Type Old Value New Value
    Removed CWE NIST CWE-400
    Added CWE NIST CWE-770
  • Initial Analysis by [email protected]

    Mar. 10, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    Changed Reference Type https://go.dev/cl/468124 No Types Assigned https://go.dev/cl/468124 Patch, Release Notes
    Changed Reference Type https://go.dev/issue/58006 No Types Assigned https://go.dev/issue/58006 Issue Tracking, Patch, Vendor Advisory
    Changed Reference Type https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E No Types Assigned https://groups.google.com/g/golang-announce/c/V0aBFqaFs_E Mailing List, Vendor Advisory
    Changed Reference Type https://pkg.go.dev/vuln/GO-2023-1569 No Types Assigned https://pkg.go.dev/vuln/GO-2023-1569 Vendor Advisory
    Added CWE NIST CWE-400
    Added CPE Configuration OR *cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* versions up to (excluding) 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 is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-41725 is associated with the following CWEs:

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.16 }} 0.02%

score

0.52684

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability