Miggo Logo

CVE-2022-23536: Cortex's Alertmanager can expose local files content via specially crafted config

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.56828%
Published
12/19/2022
Updated
10/2/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/cortexproject/cortexgo= 1.14.01.14.1
github.com/cortexproject/cortexgo>= 1.13.0, < 1.13.21.13.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insufficient validation of OpsGenie configuration parameters in Alertmanager configs. The commit 03e023d adds validation for 'api_key_file' in OpsGenieConfig and 'opsgenie_api_key_file' in GlobalConfig, indicating these were previously unvalidated. The Go vulnerability report (GO-2022-1175) explicitly identifies validateAlertmanagerConfig and validateGlobalConfig as affected symbols. These functions were responsible for config validation but didn't check for dangerous file path parameters in OpsGenie configurations, enabling local file inclusion when processing malicious API requests.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t * lo**l *il* in*lusion vuln*r**ility *xists in *ort*x v*rsions v*.**.*, v*.**.* *n* v*.**.*, w**r* * m*li*ious **tor *oul* r*mot*ly r*** lo**l *il*s *s * r*sult o* p*rsin* m*li*iously *r**t** *l*rtm*n***r *on*i*ur*tions w**n su*mitt** to

Reasoning

T** vuln*r**ility st*ms *rom insu**i*i*nt v*li**tion o* Ops**ni* *on*i*ur*tion p*r*m*t*rs in *l*rtm*n***r *on*i*s. T** *ommit ******* ***s v*li**tion *or '*pi_k*y_*il*' in Ops**ni**on*i* *n* 'ops**ni*_*pi_k*y_*il*' in *lo**l*on*i*, in*i**tin* t**s* w