CVE-2022-21698Uncontrolled Resource Consumption in promhttp
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | golang-github-prometheus-client-golang | Fix pending | UBUNTU-CVE-2022-21698 | |
| Ubuntu 26.04 | golang-github-prometheus-client-golang | Under investigation | UBUNTU-CVE-2022-21698 | |
| Ubuntu 25.10 | golang-github-prometheus-client-golang | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21698 | |
| Ubuntu 24.04 | golang-github-prometheus-client-golang | Under investigation | UBUNTU-CVE-2022-21698 | |
| Ubuntu 22.04 | golang-github-prometheus-client-golang | Under investigation | UBUNTU-CVE-2022-21698 | |
| Ubuntu 20.04 | golang-github-prometheus-client-golang | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21698 | |
| Ubuntu 18.04 | golang-github-prometheus-client-golang | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-21698 | |
| Debian 14 | golang-github-prometheus-client-golang | Fixed | 1.11.1-1 | DEBIAN-CVE-2022-21698 |
| Debian 13 | golang-github-prometheus-client-golang | Fixed | 1.11.1-1 | DEBIAN-CVE-2022-21698 |
| Debian 12 | golang-github-prometheus-client-golang | Fixed | 1.11.1-1 | DEBIAN-CVE-2022-21698 |
| Red Hat Enterprise Linux 9 | buildah | Not affected | ||
| Red Hat Enterprise Linux 9 | buildah-tests | Not affected | ||
| Red Hat Enterprise Linux 9 | conmon | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana | Fixed | 0:7.5.15-3.el9 | RHSA-2022:8057 |
| Red Hat Enterprise Linux 9 | podman | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-catatonit | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-docker | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-gvproxy | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-plugins | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-remote | Not affected | ||
| Red Hat Enterprise Linux 9 | podman-tests | Not affected | ||
| Red Hat Enterprise Linux 9 | skopeo | Not affected | ||
| Red Hat Enterprise Linux 9 | skopeo-tests | Not affected | ||
| Red Hat Enterprise Linux 8 | aardvark-dns | Fixed | 2:1.0.1-27.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | buildah | Fixed | 0:1.19.9-6.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | buildah-tests | Fixed | 0:1.19.9-6.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | cockpit-podman | Fixed | 0:29-2.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | conmon | Fixed | 2:2.0.26-3.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | container-selinux | Fixed | 2:2.189.0-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | containernetworking-plugins | Fixed | 0:0.9.1-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | containers-common | Fixed | 2:1-27.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | crit | Fixed | 0:3.15-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | criu | Fixed | 0:3.15-3.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | criu-devel | Fixed | 0:3.15-3.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | criu-libs | Fixed | 0:3.15-3.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | crun | Fixed | 0:0.18-3.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | fuse-overlayfs | Fixed | 0:1.4.0-2.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | grafana | Fixed | 0:7.5.15-3.el8 | RHSA-2022:7519 |
| Red Hat Enterprise Linux 8 | libslirp | Fixed | 0:4.3.1-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | libslirp-devel | Fixed | 0:4.3.1-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | netavark | Fixed | 2:1.0.1-27.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | oci-seccomp-bpf-hook | Fixed | 0:1.2.3-3.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | podman | Fixed | 0:3.0.1-13.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | podman-catatonit | Fixed | 0:3.0.1-13.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | podman-docker | Fixed | 2:4.0.2-6.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | podman-gvproxy | Fixed | 2:4.0.2-6.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | podman-manpages | Not affected | ||
| Red Hat Enterprise Linux 8 | podman-plugins | Fixed | 2:4.0.2-6.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | podman-remote | Fixed | 0:3.0.1-13.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | podman-tests | Fixed | 0:3.0.1-13.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | python-podman | Fixed | 0:4.0.0-1.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | python3-criu | Fixed | 0:3.15-3.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | python3-podman | Fixed | 0:4.0.0-1.module+el8.6.0+14673+621cb8be | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | runc | Fixed | 1:1.0.3-2.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | skopeo | Fixed | 1:1.2.4-2.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | skopeo-tests | Fixed | 1:1.2.4-2.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 8 | slirp4netns | Fixed | 0:1.1.8-2.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | toolbox | Fixed | 0:0.0.99.3-0.4.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | toolbox-tests | Fixed | 0:0.0.99.3-0.4.module+el8.6.0+14673+621cb8be | RHSA-2022:7529 |
| Red Hat Enterprise Linux 8 | udica | Fixed | 0:0.2.4-1.module+el8.7.0+16212+65e1b35f | RHSA-2022:1762 |
| Red Hat Enterprise Linux 7 | buildah | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | podman | Will not fix Out of support scope | ||
| AlmaLinux 9 | grafana | Fixed | 7.5.15-3.el9 | ALSA-2022:8057 |
| AlmaLinux 8 | aardvark-dns | Fixed | 2:1.0.1-27.module_el8.6.0+2878+e681bc44 | ALSA-2022:1762 |
| AlmaLinux 8 | buildah | Fixed | 1.19.9-6.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | buildah-tests | Fixed | 1:1.24.2-4.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | cockpit-podman | Fixed | 43-1.module_el8.6.0+2877+8e437bf5 | ALSA-2022:7529 |
| AlmaLinux 8 | conmon | Fixed | 2:2.0.26-3.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | container-selinux | Fixed | 2:2.189.0-1.module_el8.6.0+3336+00d107d5 | ALSA-2022:7529 |
| AlmaLinux 8 | containernetworking-plugins | Fixed | 1:1.0.1-2.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | containers-common | Fixed | 2:1-27.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | crit | Fixed | 3.15-1.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:7529 |
| AlmaLinux 8 | criu | Fixed | 3.15-1.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:1762 |
| AlmaLinux 8 | criu-devel | Fixed | 3.15-3.module_el8.6.0+2877+8e437bf5 | ALSA-2022:1762 |
| AlmaLinux 8 | criu-libs | Fixed | 3.15-3.module_el8.6.0+2751+06427ca3 | ALSA-2022:1762 |
| AlmaLinux 8 | crun | Fixed | 0.18-3.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:1762 |
| AlmaLinux 8 | fuse-overlayfs | Fixed | 1.8.2-1.module_el8.6.0+2877+8e437bf5 | ALSA-2022:7529 |
| AlmaLinux 8 | grafana | Fixed | 7.5.15-3.el8 | ALSA-2022:7519 |
| AlmaLinux 8 | libslirp | Fixed | 4.4.0-1.module_el8.6.0+2877+8e437bf5 | ALSA-2022:7529 |
| AlmaLinux 8 | libslirp-devel | Fixed | 4.3.1-1.module_el8.6.0+3136+bfcd65b6 | ALSA-2022:1762 |
| AlmaLinux 8 | netavark | Fixed | 2:1.0.1-27.module_el8.6.0+2878+e681bc44 | ALSA-2022:1762 |
| AlmaLinux 8 | oci-seccomp-bpf-hook | Fixed | 1.2.0-3.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:7529 |
| AlmaLinux 8 | podman | Fixed | 3.0.1-13.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | podman-catatonit | Fixed | 3.0.1-13.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | podman-docker | Fixed | 2:4.0.2-6.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | podman-gvproxy | Fixed | 2:4.0.2-6.module_el8.6.0+2878+e681bc44 | ALSA-2022:1762 |
| AlmaLinux 8 | podman-plugins | Fixed | 2:4.0.2-6.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | podman-remote | Fixed | 2:4.0.2-6.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | podman-tests | Fixed | 3.0.1-13.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | python3-criu | Fixed | 3.15-1.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:7529 |
| AlmaLinux 8 | python3-podman | Fixed | 4.0.0-1.module_el8.6.0+2877+8e437bf5 | ALSA-2022:1762 |
| AlmaLinux 8 | runc | Fixed | 1:1.0.3-2.module_el8.6.0+2878+e681bc44 | ALSA-2022:7529 |
| AlmaLinux 8 | skopeo | Fixed | 1:1.2.4-2.module_el8.7.0+3297+1eb250cf | ALSA-2022:1762 |
| AlmaLinux 8 | skopeo-tests | Fixed | 2:1.6.1-2.module_el8.6.0+2877+8e437bf5 | ALSA-2022:7529 |
| AlmaLinux 8 | slirp4netns | Fixed | 1.1.8-1.module_el8.6.0+3136+bfcd65b6 | ALSA-2022:7529 |
| AlmaLinux 8 | toolbox | Fixed | 0.0.99.3-0.4.module_el8.6.0+2877+8e437bf5 | ALSA-2022:7529 |
| AlmaLinux 8 | toolbox-tests | Fixed | 0.0.99.3-1.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:1762 |
| AlmaLinux 8 | udica | Fixed | 0.2.4-1.module_el8.6.0+2876+9ed4eae2 | ALSA-2022:1762 |
| Rocky Linux 9 | grafana | Fixed | 0:7.5.15-3.el9 | RLSA-2022:8057 |
| Rocky Linux 8 | buildah | Fixed | 1:1.24.2-4.module+el8.6.0+785+d1251653 | RLSA-2022:7529 |
| Rocky Linux 8 | cockpit-podman | Fixed | 0:29-2.module+el8.6.0+783+10209741 | RLSA-2022:7529 |
| Rocky Linux 8 | conmon | Fixed | 2:2.0.26-3.module+el8.7.0+1076+9b1c11c1 | RLSA-2022:7529 |
| Rocky Linux 8 | container-selinux | Fixed | 2:2.179.1-1.module+el8.6.0+785+d1251653 | RLSA-2022:7529 |
| Rocky Linux 8 | containernetworking-plugins | Fixed | 1:1.0.1-2.module+el8.6.0+785+d1251653 | RLSA-2022:7529 |
| Rocky Linux 8 | containers-common | Fixed | 2:1-27.module+el8.6.0+785+d1251653 | RLSA-2022:1762 |
| Rocky Linux 8 | criu | Fixed | 0:3.15-3.module+el8.7.0+1077+0e4f03d4 | RLSA-2022:7529 |
| Rocky Linux 8 | crun | Fixed | 0:0.18-3.module+el8.6.0+783+10209741 | RLSA-2022:7529 |
| Rocky Linux 8 | fuse-overlayfs | Fixed | 0:1.4.0-2.module+el8.6.0+783+10209741 | RLSA-2022:7529 |
| Rocky Linux 8 | grafana | Fixed | 0:7.5.15-3.el8 | RLSA-2022:7519 |
| Rocky Linux 8 | libslirp | Fixed | 0:4.4.0-1.module+el8.7.0+1077+0e4f03d4 | RLSA-2022:7529 |
| Rocky Linux 8 | oci-seccomp-bpf-hook | Fixed | 0:1.2.3-3.module+el8.5.0+710+4c471e88 | RLSA-2022:7529 |
| Rocky Linux 8 | podman | Fixed | 0:3.0.1-13.module+el8.7.0+1076+9b1c11c1 | RLSA-2022:1762 |
| Rocky Linux 8 | python-podman | Fixed | 0:4.0.0-1.module+el8.6.0+784+32aef5de | RLSA-2022:1762 |
| Rocky Linux 8 | runc | Fixed | 1:1.0.3-2.module+el8.6.0+785+d1251653 | RLSA-2022:7529 |
| Rocky Linux 8 | skopeo | Fixed | 2:1.6.1-2.module+el8.6.0+784+32aef5de | RLSA-2022:7529 |
| Rocky Linux 8 | slirp4netns | Fixed | 0:1.1.8-1.module+el8.5.0+709+440d5e7e | RLSA-2022:7529 |
| Rocky Linux 8 | toolbox | Fixed | 0:0.0.99.3-1.module+el8.6.0+783+10209741 | RLSA-2022:7529 |
| Rocky Linux 8 | udica | Fixed | 0:0.2.4-1.module+el8.6.0+783+10209741 | RLSA-2022:1762 |
| Alpine Linux 3.15 | buildah | Fixed | 1.23.4-r0 | ALPINE-CVE-2022-21698 |
| Go library | github.com/prometheus/client_golang | Fixed | 1.11.1 | GHSA-cg3q-j54f-5p7p |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/gopkg.in/macaron.v1/otelmacaron | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace | Fixed | 0.44.0 | GO-2023-2113 |
| Go library | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp | Fixed | 0.39.0 | GO-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.
- prometheus client_golang: affected: < 1.11.1
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p
- https://github.com/prometheus/client_golang/pull/962
- https://github.com/prometheus/client_golang/pull/987
- https://github.com/prometheus/client_golang/releases/tag/v1.11.1
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FY3N7H6VSDZM37B4SKM2PFFCUWU7QYWN/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZKORFJTRRDJCWBTJPISKKCVMMMJBIRLG/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AK7CJBCGERCRXYUR2EWDSSDVAQMTAZGX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SASRKYHT5ZFSVMJUQUG3UAEQRJYGJKAR/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KBMVIQFKQDSSTHVVJWJ4QH6TW3JVB7XZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7V7I72LSQ3IET3QJR6QPAVGJZ4CBDLN5/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HLAQRRGNSO5MYCPAXGPH2OCSHOGHSQMQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2PFW6Q2LXXWTFRTMTRN4ZGADFRQPKJ3D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J5WPM42UR6XIBQNQPNQHM32X7S4LJTRX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4KDETHL5XCT6RZN2BBNOCEXRZ2W3SFU3/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36GUEPA5TPSC57DZTPYPBL6T7UPQ2FRH/
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.