{"cve":"CVE-2022-21698","nvd":{"published":"2022-02-15T16:15:08.527","modified":"2026-06-17T04:26:47.200","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-770","CWE-400"],"references":["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://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2IK53GWZ475OQ6ENABKMJMTOBZG6LXUR/"],"products":["fedoraproject:extra_packages_for_enterprise_linux","fedoraproject:fedora","prometheus:client_golang","rdo_project:rdo"],"source":"nvd","synced_at":"2026-10-19T21:28:04.509275555+00:00"},"epss":{"cve":"CVE-2022-21698","score":0.05994,"percentile":0.93321,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-cg3q-j54f-5p7p","url":"https://osv.dev/vulnerability/GHSA-cg3q-j54f-5p7p","summary":"Uncontrolled Resource Consumption in promhttp","modified":"2026-09-10T03:49:28.070124367Z","packages":[{"ecosystem":"Go","name":"github.com/prometheus/client_golang","purl":"pkg:golang/github.com/prometheus/client_golang","ranges":["<1.11.1"],"fixed":["1.11.1"]}]},{"id":"GO-2022-0322","url":"https://osv.dev/vulnerability/GO-2022-0322","summary":"Uncontrolled resource consumption in github.com/prometheus/client_golang","modified":"2026-02-04T02:57:44.554914Z","packages":[{"ecosystem":"Go","name":"github.com/prometheus/client_golang","purl":"pkg:golang/github.com/prometheus/client_golang","ranges":["<1.11.1"],"fixed":["1.11.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}