CVE-2022-21698: Uncontrolled Resource Consumption in promhttp
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.49819%
CWE
Published
2/16/2022
Updated
2/15/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/prometheus/client_golang | go | < 1.11.1 | 1.11.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from InstrumentHandler
middleware that use 'method' labels without proper validation()
. These functions directly use http.Request.Method
as a metric label value, allowing attackers to create high cardinality by sending requests with arbitrary methods. The patches in PR #962/#987 added method validation()
and sanitization to prevent this. RequestsInFlight
is excluded as it doesn't use method labels.