Vulnerability · Published Feb 15, 2022 · Assigned by GitHub_M

CVE-2022-21698Uncontrolled Resource Consumption in promhttp

High 7.5

In plain English

A high-severity uncontrolled resource consumption in client_golang from prometheus. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 6.0% (higher than 93% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)6.0%top 6.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

client_golang is the instrumentation library for Go applications in Prometheus, and the promhttp package in client_golang provides tooling around HTTP servers and clients. In client_golang prior to version 1.11.1, HTTP server is susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods. In order to be affected, an instrumented software must use any of `promhttp.InstrumentHandler*` middleware except `RequestsInFlight`; not filter any specific methods (e.g GET) before middleware; pass metric with `method` label name to our middleware; and not have any firewall/LB/proxy that filters away requests with unknown `method`. client_golang version 1.11.1 contains a patch for this issue. Several workarounds are available, including removing the `method` label name from counter/gauge used in the InstrumentHandler; turning off affected promhttp handlers; adding custom middleware before promhttp handler that will sanitize the request method given by Go http.Request; and using a reverse proxy or web application firewall, configured to only allow a limited set of methods.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8aardvark-dns2:1.0.1-27.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8buildah1:1.24.2-4.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8buildah1.19.9-6.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8buildah-tests1.19.9-6.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8buildah-tests1:1.24.2-4.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8cockpit-podman29-2.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8cockpit-podman43-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8conmon2:2.0.26-3.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8conmon2:2.1.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8container-selinux2:2.189.0-1.module_el8.6.0+3336+00d107d5ALSA-2022:7529
AlmaLinux:8container-selinux2:2.179.1-1.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8container-selinux2:2.189.0-1.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8container-selinux2:2.189.0-1.module_el8.7.0+3406+a17c4180ALSA-2022:7529
AlmaLinux:8containernetworking-plugins0.9.1-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8containernetworking-plugins1:1.0.1-2.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8containernetworking-plugins0.9.1-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8containers-common1:1.2.4-2.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8containers-common2:1-27.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8crit3.15-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8crit3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux:8crit3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8crit3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8criu3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux:8criu3.15-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8criu3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8criu3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8criu-devel3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux:8criu-devel3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8criu-libs3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8criu-libs3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux:8crun1.4.4-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8crun0.18-3.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8crun0.18-3.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8fuse-overlayfs1.4.0-2.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8fuse-overlayfs1.4.0-2.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8fuse-overlayfs1.8.2-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8grafana7.5.15-3.el8ALSA-2022:7519
AlmaLinux:9grafana7.5.15-3.el9ALSA-2022:8057
AlmaLinux:8libslirp4.4.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8libslirp4.3.1-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8libslirp4.3.1-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8libslirp-devel4.3.1-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8libslirp-devel4.3.1-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8libslirp-devel4.4.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8netavark2:1.0.1-27.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8oci-seccomp-bpf-hook1.2.3-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8oci-seccomp-bpf-hook1.2.0-3.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8oci-seccomp-bpf-hook1.2.0-3.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8podman2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8podman-catatonit3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8podman-catatonit2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-docker3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8podman-docker2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-gvproxy2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-plugins2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-plugins3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8podman-remote2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-remote3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8podman-tests2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8podman-tests3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8python3-criu3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux:8python3-criu3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8python3-criu3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8python3-criu3.15-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8python3-podman4.0.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8runc1.0.0-73.rc95.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8runc1:1.0.3-2.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux:8runc1.0.0-73.rc95.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8skopeo1:1.2.4-2.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8skopeo2:1.6.1-2.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8skopeo-tests2:1.6.1-2.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8skopeo-tests1:1.2.4-2.module_el8.7.0+3297+1eb250cfALSA-2022:7529
AlmaLinux:8slirp4netns1.1.8-2.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8slirp4netns1.1.8-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8slirp4netns1.1.8-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8toolbox0.0.99.3-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8toolbox0.0.99.3-0.4.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8toolbox0.0.99.3-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8toolbox-tests0.0.99.3-0.4.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8toolbox-tests0.0.99.3-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux:8toolbox-tests0.0.99.3-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux:8udica0.2.6-2.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux:8udica0.2.4-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
Debian:12golang-github-prometheus-client-golang1.11.1-1DEBIAN-CVE-2022-21698
Debian:13golang-github-prometheus-client-golang1.11.1-1DEBIAN-CVE-2022-21698
Debian:14golang-github-prometheus-client-golang1.11.1-1DEBIAN-CVE-2022-21698
Gogithub.com/prometheus/client_golang1.11.1GHSA-cg3q-j54f-5p7p
Gogithub.com/prometheus/client_golang1.11.1GO-2022-0322
Rocky Linux:8buildah1:1.24.2-4.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8buildah0:1.19.9-6.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8cockpit-podman0:29-2.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8cockpit-podman0:43-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8cockpit-podman0:29-2.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8cockpit-podman0:29-2.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8cockpit-podman0:29-2.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8conmon2:2.1.0-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8conmon2:2.0.26-3.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8conmon2:2.0.26-3.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8container-selinux2:2.189.0-1.module+el8.6.0+1054+50b00ff4RLSA-2022:7529
Rocky Linux:8container-selinux2:2.179.1-1.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8container-selinux2:2.189.0-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8containernetworking-plugins0:0.9.1-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8containernetworking-plugins0:0.9.1-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8containernetworking-plugins0:0.9.1-1.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8containernetworking-plugins0:0.9.1-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8containernetworking-plugins1:1.0.1-2.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8containers-common2:1-27.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8criu0:3.15-3.module+el8.7.0+1077+0e4f03d4RLSA-2022:1762
Rocky Linux:8criu0:3.15-3.module+el8.6.0+1054+50b00ff4RLSA-2022:1762
Rocky Linux:8criu0:3.15-1.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8criu0:3.15-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8criu0:3.15-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8criu0:3.15-3.module+el8.5.0+710+4c471e88RLSA-2022:1762
Rocky Linux:8criu0:3.15-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8crun0:0.18-3.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8crun0:1.4.4-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8crun0:0.18-3.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8fuse-overlayfs0:1.4.0-2.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8fuse-overlayfs0:1.4.0-2.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8fuse-overlayfs0:1.8.2-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8fuse-overlayfs0:1.4.0-2.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8fuse-overlayfs0:1.4.0-2.module+el8.4.0+558+7340b765RLSA-2022:7529
Rocky Linux:8grafana0:7.5.15-3.el8RLSA-2022:7519
Rocky Linux:9grafana0:7.5.15-3.el9RLSA-2022:8057
Rocky Linux:8libslirp0:4.3.1-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8libslirp0:4.4.0-1.module+el8.6.0+1054+50b00ff4RLSA-2022:1762
Rocky Linux:8libslirp0:4.4.0-1.module+el8.7.0+1077+0e4f03d4RLSA-2022:1762
Rocky Linux:8libslirp0:4.4.0-1.module+el8.5.0+710+4c471e88RLSA-2022:1762
Rocky Linux:8libslirp0:4.3.1-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8libslirp0:4.3.1-1.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8libslirp0:4.3.1-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.3-3.module+el8.5.0+710+4c471e88RLSA-2022:1762
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.0-3.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.0-3.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.0-3.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8oci-seccomp-bpf-hook0:1.2.3-3.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8podman2:4.0.2-6.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8podman0:3.0.1-13.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8python-podman0:4.0.0-1.module+el8.7.0+1077+0e4f03d4RLSA-2022:1762
Rocky Linux:8python-podman0:4.0.0-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8runc0:1.0.0-73.rc95.module+el8.5.0+769+55ca48e8RLSA-2022:7529
Rocky Linux:8runc1:1.0.3-2.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux:8runc0:1.0.0-73.rc95.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8runc0:1.0.0-73.rc95.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8skopeo1:1.2.4-2.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8skopeo2:1.6.1-2.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8slirp4netns0:1.1.8-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8slirp4netns0:1.1.8-2.module+el8.7.0+1077+0e4f03d4RLSA-2022:1762
Rocky Linux:8slirp4netns0:1.1.8-2.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8slirp4netns0:1.1.8-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8slirp4netns0:1.1.8-1.module+el8.4.0+537+38cf4e42RLSA-2022:7529
Rocky Linux:8slirp4netns0:1.1.8-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8toolbox0:0.0.99.3-0.4.module+el8.5.0+710+4c471e88RLSA-2022:1762
Rocky Linux:8toolbox0:0.0.99.3-0.4.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux:8toolbox0:0.0.99.3-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8toolbox0:0.0.99.3-1.module+el8.5.0+734+8397cf81RLSA-2022:7529
Rocky Linux:8toolbox0:0.0.99.3-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8udica0:0.2.4-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux:8udica0:0.2.4-1.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux:8udica0:0.2.4-1.module+el8.4.0+556+40122d08RLSA-2022:7529
Rocky Linux:8udica0:0.2.4-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux:8udica0:0.2.6-2.module+el8.6.0+784+32aef5deRLSA-2022:1762
Ubuntu:22.04:LTSgolang-github-prometheus-client-golangno fix listedUBUNTU-CVE-2022-21698
Ubuntu:24.04:LTSgolang-github-prometheus-client-golangno fix listedUBUNTU-CVE-2022-21698
Ubuntu:25.10golang-github-prometheus-client-golangno fix listedUBUNTU-CVE-2022-21698
Ubuntu:26.04:LTSgolang-github-prometheus-client-golangno fix listedUBUNTU-CVE-2022-21698
Ubuntu:26.10golang-github-prometheus-client-golangno fix listedUBUNTU-CVE-2022-21698

Affected products (as reported)

VendorProductVersions
prometheus client_golang < 1.11.1

Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References