{"ecosystem":"go","package":"github.com/prometheus/client_golang","version":null,"bugs":[{"id":977,"ecosystem":"go","package_name":"github.com/prometheus/client_golang","affected_version":null,"fixed_version":"1.11.1","bug_id":"osv:GHSA-cg3q-j54f-5p7p","title":"Uncontrolled Resource Consumption in promhttp","description":"This is the Go client library for Prometheus. It has two separate parts, one for instrumenting application code, and one for creating clients that talk to the Prometheus HTTP API. 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.\n\n### Impact\n\nHTTP server susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods.\n\n###  Affected Configuration\n\nIn order to be affected, an instrumented software must\n\n* Use any of `promhttp.InstrumentHandler*` middleware except `RequestsInFlight`.\n* Do not filter any specific methods (e.g GET) before middleware.\n* Pass metric with `method` label name to our middleware.\n* Not have any firewall/LB/proxy that filters away requests with unknown `method`.\n\n### Patches\n\n* https://github.com/prometheus/client_golang/pull/962\n* https://github.com/prometheus/client_golang/pull/987\n\n### Workarounds\n\nIf you cannot upgrade to [v1.11.1 or above](https://github.com/prometheus/client_golang/releases/tag/v1.11.1), in order to stop being affected you can:\n\n* Remove `method` label name from counter/gauge you use in the InstrumentHandler.\n* Turn off affected promhttp handlers.\n* Add custom middleware before promhttp handler that will sanitize the request method given by Go http.Request.\n* Use a reverse proxy or web application firewall, configured to only allow a limited set of methods.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in https://github.com/prometheus/client_golang\n* Email us at `prometheus-team@googlegroups.com`\n","severity":"high","status":"fixed","source":"osv","source_url":"https://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p","labels":["CVE-2022-21698","GO-2022-0322"],"created_at":"2026-04-19 04:32:28.584514+00:00","updated_at":"2026-04-19 04:32:28.584514+00:00"},{"id":978,"ecosystem":"go","package_name":"github.com/prometheus/client_golang","affected_version":null,"fixed_version":"1.11.1","bug_id":"osv:GO-2022-0322","title":"Uncontrolled resource consumption in github.com/prometheus/client_golang","description":"The Prometheus client_golang HTTP server is vulnerable to a denial of service attack when handling requests with non-standard HTTP methods.\n\nIn order to be affected, an instrumented software must use any of the promhttp.InstrumentHandler* middleware except RequestsInFlight; not filter any specific methods (e.g GET) before middleware; pass a metric with a \"method\" label name to a middleware; and not have any firewall/LB/proxy that filters away requests with unknown \"method\".","severity":"medium","status":"fixed","source":"osv","source_url":"https://github.com/prometheus/client_golang/pull/962","labels":["CVE-2022-21698","GHSA-cg3q-j54f-5p7p"],"created_at":"2026-04-19 04:32:28.585725+00:00","updated_at":"2026-04-19 04:32:28.585725+00:00"}],"total":2,"_cache":"hit"}