Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2022-41725

golang: net/http, mime/multipart: denial of service from excessive resource consumption

Overview

Published
28 Feb 2023
Modified
17 Jun 2026
High CVE
2 Registry packages
101 OS packages
17 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

7.5 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

Weakness: CWE-770

Affected packages · 2

Packages affected by CVE-2022-41725
EcosystemPackageVulnerableFixed in
Bitnami golang <1.19.6>=1.20.0, <1.20.1 1.19.61.20.1
Go stdlib <1.19.6>=1.20.0-0, <1.20.1 1.19.61.20.1

Open a package to see all its vulnerabilities.

Operating systems · 199 fixes

Azure Linux 1 release · 1 package

fixed 1
golang
Azure Linux fixes for CVE-2022-41725
ReleasePackageFixed in
3.0 golang 0:1.19.5-1.azl3

Oracle Linux 2 releases · 20 packages

fixed 24
udica fuse-overlayfs go-toolset slirp4netns oci-seccomp-bpf-hook crun +14
Oracle Linux fixes for CVE-2022-41725
ReleasePackageFixed in
8 udica 0.2.6-20.module+el8.9.0+90021+ce997450
8 fuse-overlayfs 1.12-1.module+el8.9.0+90021+ce997450
8 go-toolset +7 1.19.6-1.module+el8.8.0+21053+7bf42711
8 slirp4netns 1.2.1-1.module+el8.9.0+90021+ce997450
8 oci-seccomp-bpf-hook 1.2.9-1.module+el8.9.0+90021+ce997450
8 crun 1.8.7-1.module+el8.9.0+90021+ce997450

18 more rows

Photon OS 2 releases · 3 packages

fixed 6
falco go kubernetes-dashboard
Photon OS fixes for CVE-2022-41725
ReleasePackageFixed in
4.0 falco +1 0.35.0-4.0510183001.ph4
4.0 go 1.20.2-1.ph4
4.0 kubernetes-dashboard 2.7.0-1.ph4
5.0 falco 0.32.2-6.0601037001.ph5
5.0 go 1.26.3-1.ph5
5.0 kubernetes-dashboard 2.7.0-6.ph5

Red Hat 8 releases · 32 packages

eol 2 wont fix 4 affected 1 fixed 67
heketi go-toolset-7-golang conmon golang git-lfs python3-werkzeug +26
Red Hat fixes for CVE-2022-41725
ReleasePackageFixed inAdvisory
heketi +2 eol —
go-toolset-7-golang +9 wont fix —
7 conmon +4 affected —
7 golang +2 eol —
8 git-lfs +5 wont fix —
8 python3-werkzeug 0:1.0.1-3.el8ost RHSA-2023:1325

68 more rows

SUSE Linux Enterprise 1 release · 5 packages

fixed 5
go1-18 go1-18-openssl go1-19 go1-20 container-suseconnect
SUSE Linux Enterprise fixes for CVE-2022-41725
ReleasePackageFixed inAdvisory
15.4 go1-18 +2 1.18.10-150000.1.46.1 SUSE-SU-2023:0869-1
15.4 go1-18-openssl +2 1.18.10.1-150000.1.9.1 SUSE-SU-2023:2312-1
15.4 go1-19 +2 1.19.7-150000.1.23.1 SUSE-SU-2023:0733-1
15.4 go1-20 +2 1.20.2-150000.1.5.1 SUSE-SU-2023:0735-1
15.4 container-suseconnect 2.4.0-150000.4.24.1 SUSE-SU-2023:0871-1

alma 4 releases · 22 packages

fixed 46
toolbox udica slirp4netns oci-seccomp-bpf-hook crun fuse-overlayfs +16
alma fixes for CVE-2022-41725
ReleasePackageFixed in
8 (container-tools:4.0) toolbox +1 0.0.99.4-5.module_el8.9.0+3627+db8ec155
8 (container-tools:4.0) udica 0.2.6-4.module_el8.9.0+3627+db8ec155
8 (container-tools:4.0) slirp4netns 1.1.8-3.module_el8.9.0+3627+db8ec155
8 (container-tools:4.0) oci-seccomp-bpf-hook 1.2.5-2.module_el8.8.0+3468+16b86c82
8 (container-tools:4.0) crun 1.8.3-1.module_el8.9.0+3627+db8ec155
8 (container-tools:4.0) fuse-overlayfs 1.9-2.module_el8.9.0+3627+db8ec155

40 more rows

alpine 4 releases · 1 package

fixed 4
go
alpine fixes for CVE-2022-41725
ReleasePackageFixed in
3.22 go 1.20.1-r0
3.23 go 1.20.1-r0
3.24 go 1.20.1-r0
edge go 1.20.1-r0

amazon linux 1 release · 1 package

fixed 1
golang
amazon linux fixes for CVE-2022-41725
ReleasePackageFixed in
2023 golang +7 1.19.8-1.amzn2023.0.1

chainguard 1 release · 1 package

fixed 1
kubeflow-katib
chainguard fixes for CVE-2022-41725
ReleasePackageFixed in
kubeflow-katib 0.19.0-r40

debian 3 releases · 3 packages

affected 2 fixed 1
golang-1-11 golang-1-15 golang-1-19
debian fixes for CVE-2022-41725
ReleasePackageFixed in
10 golang-1-11 affected
11 golang-1-15 affected
12 golang-1-19 1.19.6-2

echo 1 release · 1 package

fixed 1
golang-1-19
echo fixes for CVE-2022-41725
ReleasePackageFixed in
golang-1-19 1.19.6-2

minimos 1 release · 1 package

fixed 1
trigger-dev
minimos fixes for CVE-2022-41725
ReleasePackageFixed in
trigger-dev 4.5.11-r1

openSUSE 1 release · 3 packages

fixed 3
go1-18 go1-19 go1-20
openSUSE fixes for CVE-2022-41725
ReleasePackageFixed inAdvisory
Tumbleweed go1-18 +2 1.18.10-1.1 openSUSE-SU-2024:12798-1
Tumbleweed go1-19 +2 1.19.6-1.1 openSUSE-SU-2024:12707-1
Tumbleweed go1-20 +2 1.20.1-1.1 openSUSE-SU-2024:12708-1

rocky 2 releases · 19 packages

fixed 19
udica slirp4netns oci-seccomp-bpf-hook crun fuse-overlayfs containernetworking-plugins +13
rocky fixes for CVE-2022-41725
ReleasePackageFixed in
8 (container-tools:4.0) udica 0.2.6-4.module+el8.9.0+1445+07728297
8 (container-tools:4.0) slirp4netns 1.1.8-3.module+el8.9.0+1445+07728297
8 (container-tools:4.0) oci-seccomp-bpf-hook 1.2.5-2.module+el8.9.0+1445+07728297
8 (container-tools:4.0) crun 1.8.3-1.module+el8.9.0+1445+07728297
8 (container-tools:4.0) fuse-overlayfs 1.9-2.module+el8.9.0+1445+07728297
8 (container-tools:4.0) containernetworking-plugins 1:1.1.1-5.module+el8.9.0+1445+07728297

13 more rows

root.io debian 1 release · 1 package

fixed 1
rootio-golang-1-19
root.io debian fixes for CVE-2022-41725
ReleasePackageFixed in
12 rootio-golang-1-19 1.19.6-2

ubuntu 4 releases · 4 packages

affected 3 fixed 5
golang-1-10 golang-1-18 golang-1-13 golang-1-17
ubuntu fixes for CVE-2022-41725
ReleasePackageFixed in
18.04-ESM golang-1-10 +4 affected
18.04-ESM golang-1-18 1.18.1-1ubuntu1~18.04.4+esm1
20.04 golang-1-18 1.18.1-1ubuntu1~20.04.3
20.04-ESM golang-1-13 +2 affected
20.04-ESM golang-1-18 1.18.1-1ubuntu1~20.04.3
22.04 golang-1-13 affected

2 more rows

wolfi 1 release · 1 package

fixed 1
kubeflow-katib
wolfi fixes for CVE-2022-41725
ReleasePackageFixed in
kubeflow-katib 0.19.0-r40

References

Show all 66 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.