CVEfocus › CVE database › CVE-2022-21698

CVE-2022-21698Uncontrolled Resource Consumption in promhttp

CVSS 7.5 HighEPSS 5.5% (higher than 94% of CVEs)Published 2022-02-15Updated 2025-04-23Assigner: GitHub_M

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.

CWE-400

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Go, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

105Fixed
1Fix pending
3Under investigation
5Will not fix
13Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-github-prometheus-client-golangFix pendingUBUNTU-CVE-2022-21698
Ubuntu 26.04golang-github-prometheus-client-golangUnder investigationUBUNTU-CVE-2022-21698
Ubuntu 25.10golang-github-prometheus-client-golangWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-21698
Ubuntu 24.04golang-github-prometheus-client-golangUnder investigationUBUNTU-CVE-2022-21698
Ubuntu 22.04golang-github-prometheus-client-golangUnder investigationUBUNTU-CVE-2022-21698
Ubuntu 20.04golang-github-prometheus-client-golangWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-21698
Ubuntu 18.04golang-github-prometheus-client-golangWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-21698
Debian 14golang-github-prometheus-client-golangFixed1.11.1-1DEBIAN-CVE-2022-21698
Debian 13golang-github-prometheus-client-golangFixed1.11.1-1DEBIAN-CVE-2022-21698
Debian 12golang-github-prometheus-client-golangFixed1.11.1-1DEBIAN-CVE-2022-21698
Red Hat Enterprise Linux 9buildahNot affected
Red Hat Enterprise Linux 9buildah-testsNot affected
Red Hat Enterprise Linux 9conmonNot affected
Red Hat Enterprise Linux 9grafanaFixed0:7.5.15-3.el9RHSA-2022:8057
Red Hat Enterprise Linux 9podmanNot affected
Red Hat Enterprise Linux 9podman-catatonitNot affected
Red Hat Enterprise Linux 9podman-dockerNot affected
Red Hat Enterprise Linux 9podman-gvproxyNot affected
Red Hat Enterprise Linux 9podman-pluginsNot affected
Red Hat Enterprise Linux 9podman-remoteNot affected
Red Hat Enterprise Linux 9podman-testsNot affected
Red Hat Enterprise Linux 9skopeoNot affected
Red Hat Enterprise Linux 9skopeo-testsNot affected
Red Hat Enterprise Linux 8aardvark-dnsFixed2:1.0.1-27.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8buildahFixed0:1.19.9-6.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8buildah-testsFixed0:1.19.9-6.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8cockpit-podmanFixed0:29-2.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8conmonFixed2:2.0.26-3.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8container-selinuxFixed2:2.189.0-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8containernetworking-pluginsFixed0:0.9.1-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8containers-commonFixed2:1-27.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8critFixed0:3.15-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8criuFixed0:3.15-3.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8criu-develFixed0:3.15-3.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8criu-libsFixed0:3.15-3.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8crunFixed0:0.18-3.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8fuse-overlayfsFixed0:1.4.0-2.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8grafanaFixed0:7.5.15-3.el8RHSA-2022:7519
Red Hat Enterprise Linux 8libslirpFixed0:4.3.1-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8libslirp-develFixed0:4.3.1-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8netavarkFixed2:1.0.1-27.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8oci-seccomp-bpf-hookFixed0:1.2.3-3.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8podmanFixed0:3.0.1-13.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8podman-catatonitFixed0:3.0.1-13.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8podman-dockerFixed2:4.0.2-6.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8podman-gvproxyFixed2:4.0.2-6.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8podman-manpagesNot affected
Red Hat Enterprise Linux 8podman-pluginsFixed2:4.0.2-6.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8podman-remoteFixed0:3.0.1-13.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8podman-testsFixed0:3.0.1-13.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8python-podmanFixed0:4.0.0-1.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8python3-criuFixed0:3.15-3.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8python3-podmanFixed0:4.0.0-1.module+el8.6.0+14673+621cb8beRHSA-2022:1762
Red Hat Enterprise Linux 8runcFixed1:1.0.3-2.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8skopeoFixed1:1.2.4-2.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8skopeo-testsFixed1:1.2.4-2.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 8slirp4netnsFixed0:1.1.8-2.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8toolboxFixed0:0.0.99.3-0.4.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8toolbox-testsFixed0:0.0.99.3-0.4.module+el8.6.0+14673+621cb8beRHSA-2022:7529
Red Hat Enterprise Linux 8udicaFixed0:0.2.4-1.module+el8.7.0+16212+65e1b35fRHSA-2022:1762
Red Hat Enterprise Linux 7buildahWill not fix
Out of support scope
Red Hat Enterprise Linux 7podmanWill not fix
Out of support scope
AlmaLinux 9grafanaFixed7.5.15-3.el9ALSA-2022:8057
AlmaLinux 8aardvark-dnsFixed2:1.0.1-27.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux 8buildahFixed1.19.9-6.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8buildah-testsFixed1:1.24.2-4.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8cockpit-podmanFixed43-1.module_el8.6.0+2877+8e437bf5ALSA-2022:7529
AlmaLinux 8conmonFixed2:2.0.26-3.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8container-selinuxFixed2:2.189.0-1.module_el8.6.0+3336+00d107d5ALSA-2022:7529
AlmaLinux 8containernetworking-pluginsFixed1:1.0.1-2.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8containers-commonFixed2:1-27.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8critFixed3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux 8criuFixed3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:1762
AlmaLinux 8criu-develFixed3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux 8criu-libsFixed3.15-3.module_el8.6.0+2751+06427ca3ALSA-2022:1762
AlmaLinux 8crunFixed0.18-3.module_el8.6.0+2876+9ed4eae2ALSA-2022:1762
AlmaLinux 8fuse-overlayfsFixed1.8.2-1.module_el8.6.0+2877+8e437bf5ALSA-2022:7529
AlmaLinux 8grafanaFixed7.5.15-3.el8ALSA-2022:7519
AlmaLinux 8libslirpFixed4.4.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:7529
AlmaLinux 8libslirp-develFixed4.3.1-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:1762
AlmaLinux 8netavarkFixed2:1.0.1-27.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux 8oci-seccomp-bpf-hookFixed1.2.0-3.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux 8podmanFixed3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8podman-catatonitFixed3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8podman-dockerFixed2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8podman-gvproxyFixed2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:1762
AlmaLinux 8podman-pluginsFixed2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8podman-remoteFixed2:4.0.2-6.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8podman-testsFixed3.0.1-13.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8python3-criuFixed3.15-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:7529
AlmaLinux 8python3-podmanFixed4.0.0-1.module_el8.6.0+2877+8e437bf5ALSA-2022:1762
AlmaLinux 8runcFixed1:1.0.3-2.module_el8.6.0+2878+e681bc44ALSA-2022:7529
AlmaLinux 8skopeoFixed1:1.2.4-2.module_el8.7.0+3297+1eb250cfALSA-2022:1762
AlmaLinux 8skopeo-testsFixed2:1.6.1-2.module_el8.6.0+2877+8e437bf5ALSA-2022:7529
AlmaLinux 8slirp4netnsFixed1.1.8-1.module_el8.6.0+3136+bfcd65b6ALSA-2022:7529
AlmaLinux 8toolboxFixed0.0.99.3-0.4.module_el8.6.0+2877+8e437bf5ALSA-2022:7529
AlmaLinux 8toolbox-testsFixed0.0.99.3-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:1762
AlmaLinux 8udicaFixed0.2.4-1.module_el8.6.0+2876+9ed4eae2ALSA-2022:1762
Rocky Linux 9grafanaFixed0:7.5.15-3.el9RLSA-2022:8057
Rocky Linux 8buildahFixed1:1.24.2-4.module+el8.6.0+785+d1251653RLSA-2022:7529
Rocky Linux 8cockpit-podmanFixed0:29-2.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux 8conmonFixed2:2.0.26-3.module+el8.7.0+1076+9b1c11c1RLSA-2022:7529
Rocky Linux 8container-selinuxFixed2:2.179.1-1.module+el8.6.0+785+d1251653RLSA-2022:7529
Rocky Linux 8containernetworking-pluginsFixed1:1.0.1-2.module+el8.6.0+785+d1251653RLSA-2022:7529
Rocky Linux 8containers-commonFixed2:1-27.module+el8.6.0+785+d1251653RLSA-2022:1762
Rocky Linux 8criuFixed0:3.15-3.module+el8.7.0+1077+0e4f03d4RLSA-2022:7529
Rocky Linux 8crunFixed0:0.18-3.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux 8fuse-overlayfsFixed0:1.4.0-2.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux 8grafanaFixed0:7.5.15-3.el8RLSA-2022:7519
Rocky Linux 8libslirpFixed0:4.4.0-1.module+el8.7.0+1077+0e4f03d4RLSA-2022:7529
Rocky Linux 8oci-seccomp-bpf-hookFixed0:1.2.3-3.module+el8.5.0+710+4c471e88RLSA-2022:7529
Rocky Linux 8podmanFixed0:3.0.1-13.module+el8.7.0+1076+9b1c11c1RLSA-2022:1762
Rocky Linux 8python-podmanFixed0:4.0.0-1.module+el8.6.0+784+32aef5deRLSA-2022:1762
Rocky Linux 8runcFixed1:1.0.3-2.module+el8.6.0+785+d1251653RLSA-2022:7529
Rocky Linux 8skopeoFixed2:1.6.1-2.module+el8.6.0+784+32aef5deRLSA-2022:7529
Rocky Linux 8slirp4netnsFixed0:1.1.8-1.module+el8.5.0+709+440d5e7eRLSA-2022:7529
Rocky Linux 8toolboxFixed0:0.0.99.3-1.module+el8.6.0+783+10209741RLSA-2022:7529
Rocky Linux 8udicaFixed0:0.2.4-1.module+el8.6.0+783+10209741RLSA-2022:1762
Alpine Linux 3.15buildahFixed1.23.4-r0ALPINE-CVE-2022-21698
Go librarygithub.com/prometheus/client_golangFixed1.11.1GHSA-cg3q-j54f-5p7p
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestfulFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelginFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmuxFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelechoFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaronFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptraceFixed0.44.0GO-2023-2113
Go librarygo.opentelemetry.io/contrib/instrumentation/net/http/otelhttpFixed0.39.0GO-2023-2113

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.