# CVE-2022-21698: Uncontrolled Resource Consumption in promhttp

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 5.47% (percentile 94, 2026-11-26)
- **CWE:** CWE-400
- **Aliases:** GHSA-cg3q-j54f-5p7p, GO-2022-0322
- **Published:** 2022-02-15T00:00:00.000Z
- **Modified:** 2026-09-10T03:49:28.070Z

## Who should check

- Projects that depend on Go package github.com/prometheus/client\_golang (\< 1.11.1)
- Anyone running prometheus client\_golang \< 1.11.1

## 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 and fixed versions

- Go `github.com/prometheus/client_golang`: affected \< 1.11.1; fixed 1.11.1 (osv)
- prometheus client\_golang: \< 1.11.1 (cvelist)

## Mitigation

- Upgrade github.com/prometheus/client\_golang to 1.11.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-21698. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-21698.md
Affected: github.com/prometheus/client_golang < 1.11.1
Fixed in: 1.11.1

Steps:
1. Search this machine and project for github.com/prometheus/client_golang (Go), prometheus client_golang: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-21698 being exploited?

There is no confirmed exploitation: CVE-2022-21698 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 5.47% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-21698?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2022-21698?

github.com/prometheus/client\_golang \< 1.11.1.

### Is there a fix for CVE-2022-21698?

Yes. Fixed in 1.11.1. Upgrade github.com/prometheus/client\_golang to 1.11.1 or later.

### How do I check if I'm affected by CVE-2022-21698?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FY3N7H6VSDZM37B4SKM2PFFCUWU7QYWN/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZKORFJTRRDJCWBTJPISKKCVMMMJBIRLG/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AK7CJBCGERCRXYUR2EWDSSDVAQMTAZGX/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SASRKYHT5ZFSVMJUQUG3UAEQRJYGJKAR/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KBMVIQFKQDSSTHVVJWJ4QH6TW3JVB7XZ/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7V7I72LSQ3IET3QJR6QPAVGJZ4CBDLN5/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HLAQRRGNSO5MYCPAXGPH2OCSHOGHSQMQ/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2PFW6Q2LXXWTFRTMTRN4ZGADFRQPKJ3D/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/J5WPM42UR6XIBQNQPNQHM32X7S4LJTRX/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4KDETHL5XCT6RZN2BBNOCEXRZ2W3SFU3/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36GUEPA5TPSC57DZTPYPBL6T7UPQ2FRH/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DLUJZV3HBP56ADXU6QH2V7RNYUPMVBXQ/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2IK53GWZ475OQ6ENABKMJMTOBZG6LXUR/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MH6ALXEQXIFQRQFNJ5Y2MJ5DFPIX76VN/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZY2SLWOQR4ZURQ7UBRZ7JIX6H6F5JHJR/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RN7JGC2LVHPEGSJYODFUV5FEKPBVG4D7/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5OGNAFVXSMTTT2UPH6CS3IH6L3KM42Q7/>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3L6GDN5S5QZSCFKWD3GKL2RDZQ6B4UWA/>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2022-21698>
- patch: <https://github.com/prometheus/client_golang/pull/962>
- patch: <https://github.com/prometheus/client_golang/pull/987>
- other: <https://github.com/prometheus/client_golang/releases/tag/v1.11.1>
- other: <https://pkg.go.dev/vuln/GO-2022-0322>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZY2SLWOQR4ZURQ7UBRZ7JIX6H6F5JHJR>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZKORFJTRRDJCWBTJPISKKCVMMMJBIRLG>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SASRKYHT5ZFSVMJUQUG3UAEQRJYGJKAR>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RN7JGC2LVHPEGSJYODFUV5FEKPBVG4D7>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MH6ALXEQXIFQRQFNJ5Y2MJ5DFPIX76VN>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KBMVIQFKQDSSTHVVJWJ4QH6TW3JVB7XZ>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/J5WPM42UR6XIBQNQPNQHM32X7S4LJTRX>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HLAQRRGNSO5MYCPAXGPH2OCSHOGHSQMQ>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/FY3N7H6VSDZM37B4SKM2PFFCUWU7QYWN>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DLUJZV3HBP56ADXU6QH2V7RNYUPMVBXQ>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/AK7CJBCGERCRXYUR2EWDSSDVAQMTAZGX>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7V7I72LSQ3IET3QJR6QPAVGJZ4CBDLN5>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5OGNAFVXSMTTT2UPH6CS3IH6L3KM42Q7>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4KDETHL5XCT6RZN2BBNOCEXRZ2W3SFU3>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3L6GDN5S5QZSCFKWD3GKL2RDZQ6B4UWA>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/36GUEPA5TPSC57DZTPYPBL6T7UPQ2FRH>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2PFW6Q2LXXWTFRTMTRN4ZGADFRQPKJ3D>
- other: <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2IK53GWZ475OQ6ENABKMJMTOBZG6LXUR>
- other: <https://github.com/prometheus/client_golang>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-21698>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-cg3q-j54f-5p7p> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2022-0322> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-21698> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-21698>
