Miggo Logo

CVE-2022-21698: Uncontrolled Resource Consumption in promhttp

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.49819%
Published
2/16/2022
Updated
2/15/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/prometheus/client_golanggo< 1.11.11.11.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T*is is t** *o *li*nt li*r*ry *or Prom*t**us. It **s two s*p*r*t* p*rts, on* *or instrum*ntin* *ppli**tion *o**, *n* on* *or *r**tin* *li*nts t**t t*lk to t** Prom*t**us *TTP *PI. *li*nt_*ol*n* is t** instrum*nt*tion li*r*ry *or *o *ppli**tions in Pr

Reasoning

T** vuln*r**ility st*ms *rom `Instrum*nt**n*l*r` mi**l*w*r* t**t us* 'm*t*o*' l***ls wit*out prop*r `v*li**tion()`. T**s* *un*tions *ir**tly us* `*ttp.R*qu*st.M*t*o*` *s * m*tri* l***l v*lu*, *llowin* *tt**k*rs to *r**t* *i** **r*in*lity *y s*n*in* r