Cloudanix VulnDB

CVE-2023-45290

Medium · 6.5

CVSS

6.5

EPSS

1.2%

Published

Mar 5, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in how some web applications process user-submitted forms or file uploads could allow an attacker to crash the application, making it unavailable for everyone.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

A flaw in Go's standard library for parsing multipart forms allows an attacker to cause uncontrolled memory allocation. By sending a request with a single, extremely long line within a form part, an attacker can bypass the total form size limit, forcing the server to allocate a massive amount of memory. This leads to memory exhaustion and a denial-of-service condition, crashing the application process.

Why it matters to the business

An attacker can render any Go-based web application that processes forms or file uploads unavailable to legitimate users. This can lead to service outages, disruption of business operations, violation of service level agreements (SLAs), and reputational damage. The vulnerability impacts service availability but does not lead to data theft.

How an attack unfolds

An attacker with the ability to send requests to a Go-based web service (e.g., a user with a low-privileged account) identifies an endpoint that accepts `multipart/form-data`, such as a file upload or a form submission page. The attacker crafts a malicious HTTP POST request containing a multipart form. Within one of the form's parts, they inject a single line of data that is exceptionally long. When the vulnerable Go application receives this request and calls an affected function like `Request.ParseMultipartForm` or `Request.FormFile`, it attempts to read the entire long line into a buffer in memory. Because the check is bypassed, the server allocates an enormous amount of memory, leading to memory exhaustion and causing the operating system's Out-Of-Memory (OOM) killer to terminate the application process, resulting in a denial of service.

How to fix it

This vulnerability is addressed in the Go standard library. Developers must update their Go development environment to a patched version (Go 1.22.1 or 1.21.8 or newer) and recompile and redeploy all Go applications. Simply updating the Go runtime is not sufficient; the application binaries themselves must be rebuilt with the fixed compiler.

How to confirm the fix worked

To validate the fix, verify that all Go applications have been recompiled using a non-vulnerable version of the Go toolchain (1.22.1+, 1.21.8+). This can be confirmed by checking build logs, CI/CD pipeline configurations, or by inspecting the Go version information embedded in the compiled binaries. To test for exposure, a security team can send a test request with a multipart form containing a very long line to a non-production instance and monitor for excessive memory consumption. A patched system will handle the request without significant memory spikes, while a vulnerable one will exhibit memory exhaustion.

Typical attack path

  1. The attacker identifies a target web application built with a vulnerable version of Go that processes `multipart/form-data` requests.
  2. The attacker crafts a malicious HTTP POST request containing a multipart form with an abnormally long line in one of its parts.
  3. The attacker sends this request to the application's endpoint.
  4. The server attempts to parse the malicious form, triggering excessive memory allocation.
  5. The application server crashes due to memory exhaustion, resulting in a denial of service for all users.

How to detect it

Monitor for signs of exploitation by observing application server metrics. A sudden, sharp increase in memory usage on a Go application server, followed by a process crash or restart, is a strong indicator of an attack. Review web server and application logs for HTTP 5xx errors, out-of-memory (OOM) log entries, or other crash-related messages that correlate with incoming POST requests to endpoints that handle multipart forms. Application Performance Monitoring (APM) tools are highly effective for detecting the memory allocation anomalies characteristic of this attack.

What your security team should do

  • Immediately identify all production applications built with the Go programming language.
  • Coordinate with development teams to upgrade their Go toolchains to a patched version (Go 1.22.1+ or 1.21.8+) and trigger a rebuild and redeployment of all identified applications.
  • Monitor application performance and memory usage for Go applications to detect anomalies that could indicate attempted or successful exploitation.

The record

When parsing a multipart form (either explicitly with Request.ParseMultipartForm or implicitly with Request.FormValue, Request.PostFormValue, or Request.FormFile), limits on the total size of the parsed form were not applied to the memory consumed while reading a single form line. This permits a maliciously crafted input containing very long lines to cause allocation of arbitrarily large amounts of memory, potentially leading to memory exhaustion. With fix, the ParseMultipartForm function now correctly limits the maximum size of form lines.

Affected packages

Ecosystem Package Introduced Fixed
Go stdlib 0 1.21.8
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 aardvark-dns 0 2:1.10.1-2.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 buildah 0 2:1.33.8-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 buildah 0 2:1.33.8-4.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 buildah-tests 0 2:1.33.8-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 buildah-tests 0 2:1.33.8-4.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 container-selinux 0 2:2.229.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 container-selinux 0 2:2.229.0-2.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 containernetworking-plugins 0 1:1.4.0-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 containernetworking-plugins 0 1:1.4.0-5.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 containers-common 0 2:1-82.module_el8.10.0+3876+e55593a8
AlmaLinux:8 containers-common 0 2:1-82.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 delve 0 1.21.2-3.module_el8.10.0+3760+4dd778f9
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3859+6ae70a0e
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 git-lfs 0 3.4.1-2.el8_10
AlmaLinux:8 go-toolset 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-bin 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-docs 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-misc 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-src 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-tests 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-catatonit 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-catatonit 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-catatonit 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-docker 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-docker 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-docker 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-plugins 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-plugins 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-plugins 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-remote 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-remote 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-remote 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 podman-tests 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-tests 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-tests 0 4:4.9.4-13.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 python3-podman 0 4.9.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 runc 0 1:1.1.12-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 runc 0 1:1.1.12-5.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 skopeo 0 2:1.14.5-3.module_el8.10.0+3876+e55593a8
AlmaLinux:8 skopeo 0 2:1.14.5-3.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 skopeo-tests 0 2:1.14.5-3.module_el8.10.0+3876+e55593a8
AlmaLinux:8 skopeo-tests 0 2:1.14.5-3.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3901+4b80ecd7
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3876+e55593a8
AlmaLinux:9 buildah 0 2:1.33.7-2.el9_4
AlmaLinux:9 buildah-tests 0 2:1.33.7-2.el9_4
AlmaLinux:9 containernetworking-plugins 0 1:1.4.0-3.el9_4
AlmaLinux:9 git-lfs 0 3.4.1-2.el9_4
AlmaLinux:9 go-toolset 0 1.21.9-2.el9_4
AlmaLinux:9 golang 0 1.21.9-2.el9_4
AlmaLinux:9 golang-bin 0 1.21.9-2.el9_4
AlmaLinux:9 golang-docs 0 1.21.9-2.el9_4
AlmaLinux:9 golang-misc 0 1.21.9-2.el9_4
AlmaLinux:9 golang-src 0 1.21.9-2.el9_4
AlmaLinux:9 golang-tests 0 1.21.9-2.el9_4
AlmaLinux:9 gvisor-tap-vsock 0 6:0.7.3-3.el9_4.alma.1
AlmaLinux:9 podman 0 4:4.9.4-4.el9_4
AlmaLinux:9 podman-docker 0 4:4.9.4-4.el9_4
AlmaLinux:9 podman-plugins 0 4:4.9.4-4.el9_4
AlmaLinux:9 podman-remote 0 4:4.9.4-4.el9_4
AlmaLinux:9 podman-tests 0 4:4.9.4-4.el9_4
AlmaLinux:9 toolbox 0 0.0.99.5-5.el9
AlmaLinux:9 toolbox-tests 0 0.0.99.5-5.el9
Bitnami golang 0 1.21.8
Chainguard actions-runner-controller 0 0.8.3-r1
Chainguard actions-runner-controller-compat 0 0.8.3-r1
Chainguard amass 0 4.2.0-r4
Chainguard argo-cd-2.7 0 2.7.17-r1
Chainguard argo-cd-2.7-compat 0 2.7.17-r1
Chainguard argo-cd-2.7-repo-server 0 2.7.17-r1
Chainguard argo-cd-fips-2.10 0 2.10.2-r1
Chainguard argo-cd-fips-2.10-compat 0 2.10.2-r1
Chainguard argo-cd-fips-2.10-repo-server 0 2.10.2-r1
Chainguard argo-cd-fips-2.9 0 2.9.6-r1
Chainguard argo-cd-fips-2.9-compat 0 2.9.6-r1
Chainguard argo-cd-fips-2.9-repo-server 0 2.9.6-r1
Chainguard argo-workflow-cli 0 3.6.5-r2
Chainguard argo-workflow-cli-fips 0 3.5.5-r1
Chainguard argo-workflow-controller 0 3.6.5-r2
Chainguard argo-workflow-controller-compat 0 3.6.5-r2
Chainguard argo-workflow-controller-compat-fips 0 3.5.5-r1
Chainguard argo-workflow-controller-fips 0 3.5.5-r1
Chainguard argo-workflow-executor 0 3.6.5-r2
Chainguard argo-workflow-executor-compat 0 3.6.5-r2
Chainguard argo-workflow-executor-compat-fips 0 3.5.5-r1
Chainguard argo-workflow-executor-fips 0 3.5.5-r1
Chainguard argo-workflows 0 3.6.5-r2
Chainguard argo-workflows-fips 0 3.5.5-r1
Chainguard argo-workflows-known-hosts 0 3.6.5-r2
Chainguard argo-workflows-known-hosts-fips 0 3.5.5-r1
Chainguard argo-workflows-ui 0 3.6.5-r2
Chainguard atlantis-fips 0 0.33.0-r6
Chainguard aws-ebs-csi-driver 0 1.28.0-r1
Chainguard aws-ebs-csi-driver-1.18 0 1.18.0-r11
Chainguard aws-ebs-csi-driver-1.19 0 1.19.0-r11
Chainguard aws-ebs-csi-driver-fips 0 1.28.0-r1
Chainguard aws-efs-csi-driver 0 1.7.6-r1
Chainguard aws-efs-csi-driver-fips 0 1.7.0-r4
Chainguard aws-efs-csi-driver-fips-1.6 0 1.6.0-r4
Chainguard aws-flb-cloudwatch 0 1.9.4-r7
Chainguard aws-flb-cloudwatch-compat 0 1.9.4-r7
Chainguard aws-flb-firehose 0 1.7.2-r7
Chainguard aws-flb-firehose-compat 0 1.7.2-r7
Chainguard aws-flb-kinesis 0 1.10.2-r7
Chainguard aws-flb-kinesis-compat 0 1.10.2-r7
Chainguard aws-load-balancer-controller 0 2.7.1-r1
Chainguard aws-load-balancer-controller-2.4.5 0 2.4.5-r9
Chainguard aws-load-balancer-controller-2.5 0 2.5.4-r2
Chainguard aws-load-balancer-controller-compat 0 2.7.1-r1
Chainguard aws-load-balancer-controller-compat-2.4.5 0 2.5.4-r2
Chainguard aws-load-balancer-controller-fips 0 2.7.1-r1
Chainguard azure-aad-pod-identity-mic 0 1.8.17-r5
Chainguard azure-aad-pod-identity-nmi 0 1.8.17-r5
Chainguard bank-vaults-fips 0 1.20.4-r5
Chainguard bank-vaults-template-fips 0 1.20.4-r5
Chainguard bazelisk 0 1.19.0-r1
Chainguard bazelisk-default 0 1.19.0-r1
Chainguard bom 0 0.6.0-r1
Chainguard boring-registry-fips 0 0.13.2-r1
Chainguard buildctl 0 0.13.1-r2
Chainguard buildkitd 0 0.13.1-r2
Chainguard caddy 0 2.7.6-r3
Chainguard caddy-man 0 2.7.6-r3
Chainguard caddy-src 0 2.7.6-r3
Chainguard cadvisor 0 0.49.1-r3
Chainguard cadvisor-compat 0 0.49.1-r3
Chainguard calico 0 3.27.2-r2
Chainguard calico-apiserver 0 3.27.2-r2
Chainguard calico-app-policy 0 3.27.2-r2
Chainguard calico-cni 0 3.27.2-r2
Chainguard calico-cni-compat 0 3.27.2-r2
Chainguard calico-cni-fips-compat 0 3.27.2-r1
Chainguard calico-felix 0 3.27.2-r2
Chainguard calico-fips 0 3.27.2-r1
Chainguard calico-fips-apiserver 0 3.27.2-r1
Chainguard calico-fips-app-policy 0 3.27.2-r1
Chainguard calico-fips-cni 0 3.27.2-r1
Chainguard calico-fips-felix 0 3.27.2-r1
Chainguard calico-fips-key-cert-provisioner 0 3.27.2-r1

Related vulnerabilities