CVE-2021-31232 json
Improper input validation in CNCF Cortex
published 2021-04-30 5 y ago modified 2026-06-17 4 mo ago also GHSA-m45g-f45x-vv22 , GO-2022-0915 , EUVD-2021-1352
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 31%
- public exploits
- 0
- none known
Summary
The Alertmanager in CNCF Cortex before 1.8.1 has a local file disclosure vulnerability when -experimental.alertmanager.enable-api is used. The HTTP basic auth password_file can be used as an attack vector to send any file content via a webhook. The alertmanager templates can be used as an attack vector to send any file content because the alertmanager can load any text file specified in the templates list.
Patch / fix
- go github.com/cortexproject/cortex 1.8.1
- linuxfoundation cortex 1.8.1
- github.com/cortexproject/cortex#4129 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-31232 updated cvss 5.5
cortex: Alertmanager can expose local files content via specially crafted config
-
Red Hat Openshift Container Storage 4 ocs4/mcg-rhel8-operator, ocs4/ocs-rhel8-operatoraffected: no fix planned “Out of support scope”
-
Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/logging-loki-rhel8 Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/thanos-rhel7, rhacm2/acm-grafana-rhel8, rhacm2/acm-prometheus-rhel8, rhacm2/rbac-query-proxy-rhel8, rhacm2/thanos-receive-controller-rhel8 Red Hat Enterprise Linux 8 grafana, grafana-loki, grafana-mssql, grafana-mysql, grafana-selinux, grafana-graphite, +8 more Red Hat Enterprise Linux 9 grafana, grafana-selinux Red Hat OpenShift Container Platform 4 openshift4/ose-grafana, openshift4/ose-thanos-rhel8, openshift4/ose-cluster-storage-operator, openshift4/ose-prometheus-rhel9-operator, openshift4/ose-cluster-monitoring-rhel9-operator Red Hat Openshift Data Foundation 4 odf4/mcg-rhel9-operator, odf4/ocs-rhel9-operator, odf4/odf-rhel8-operatornot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.37% chance of exploitation in the next 30 days, higher than 31% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 2.1 | AV:L/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/cortexproject/cortex | <1.8.1 |
1.8.1 |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/cortexproject/cortex/pull/4129/files
web, patch, third-party-advisory
-
lists.cncf.io
/g/cortex-users/message/50
web, release-notes, vendor-advisory
-
community.grafana.com
/c/security-announcements
web, third-party-advisory
-
github.com
/cortexproject/cortex
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-31232
advisory
-
github.com
/advisories/GHSA-m45g-f45x-vv22
advisory
Sources
- CVE List CVE-2021-31232
- GitHub Advisory GHSA-m45g-f45x-vv22
- NVD CVE-2021-31232
- OSV GO-2022-0915
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.