{"id":"CVE-2021-31232","aliases":["GHSA-m45g-f45x-vv22","GO-2022-0915"],"summary":"The Alertmanager in CNCF Cortex before 1.8.1 has a local file disclosure vulnerability when -experimental.alertmanager.enable-api is used.","published_at":"2021-04-28T00:00:00Z","modified_at":"2026-03-03T04:51:03.443289Z","products":[],"rating":{"severity":"medium","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","attack_path":"local","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.003700000001117587,"percentile":0.31626999378204346,"date":"2026-11-19T00:00:00Z"},"priority":5,"details":"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.","affected_stack":[],"affected_other":[{"ecosystem":"Go","package":"github.com/cortexproject/cortex","purl":"pkg:golang/github.com/cortexproject/cortex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"osv","source":"GHSA-m45g-f45x-vv22","relation":"self"},{"ecosystem":"Go","package":"github.com/cortexproject/cortex","purl":"pkg:golang/github.com/cortexproject/cortex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"osv","source":"GO-2022-0915","relation":"self"},{"ecosystem":"NVD","package":"linuxfoundation:cortex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"nvd","source":"CVE-2021-31232","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","cpe":"cpe:/a:redhat:logging:5","status":"not_affected","packages":["openshift-logging/logging-loki-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/acm-grafana-rhel8","rhacm2/acm-prometheus-rhel8","rhacm2/rbac-query-proxy-rhel8","rhacm2/thanos-receive-controller-rhel8","rhacm2/thanos-rhel7"],"package_count":5,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","cpe":"cpe:/a:redhat:enterprise_linux:8","status":"not_affected","packages":["grafana","grafana-azure-monitor","grafana-cloudwatch","grafana-elasticsearch","grafana-graphite","grafana-influxdb","grafana-loki","grafana-mssql","grafana-mysql","grafana-opentsdb","grafana-postgres","grafana-prometheus","grafana-selinux","grafana-stackdriver"],"package_count":14,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","cpe":"cpe:/a:redhat:enterprise_linux:9","status":"not_affected","packages":["grafana","grafana-selinux"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift4/ose-cluster-monitoring-rhel9-operator","openshift4/ose-cluster-storage-operator","openshift4/ose-grafana","openshift4/ose-prometheus-rhel9-operator","openshift4/ose-thanos-rhel8"],"package_count":5,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Openshift Container Storage 4","cpe":"cpe:/a:redhat:openshift_container_storage:4","status":"affected","packages":["ocs4/mcg-rhel8-operator","ocs4/ocs-rhel8-operator"],"package_count":2,"fixed":[],"advisories":[],"note":"Out of support scope","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","cpe":"cpe:/a:redhat:openshift_data_foundation:4","status":"not_affected","packages":["odf4/mcg-rhel9-operator","odf4/ocs-rhel9-operator","odf4/odf-rhel8-operator"],"package_count":3,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-31232","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-31232","license":"CC-BY-4.0","published_at":"2021-04-30T12:46:32Z","modified_at":"2024-08-03T22:55:53.349Z","summary":"The Alertmanager in CNCF Cortex before 1.8.1 has a local file disclosure vulnerability when -experimental.alertmanager.enable-api is used.","details":"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.","severity":[],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://community.grafana.com/c/security-announcements"},{"type":"WEB","url":"https://github.com/cortexproject/cortex"},{"type":"WEB","url":"https://github.com/cortexproject/cortex/pull/4129/files"},{"type":"WEB","url":"https://lists.cncf.io/g/cortex-users/message/50"}]},{"provider":"nvd","source_id":"CVE-2021-31232","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232","severity":[],"affected":[{"ecosystem":"NVD","package":"linuxfoundation:cortex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"nvd","source":"CVE-2021-31232","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-m45g-f45x-vv22","relation":"self","url":"https://osv.dev/vulnerability/GHSA-m45g-f45x-vv22","license":"CC-BY-4.0","published_at":"2021-06-23T17:20:38Z","modified_at":"2024-08-21T15:58:46.171649Z","summary":"Improper input validation in CNCF Cortex","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","source":"GHSA-m45g-f45x-vv22"}],"affected":[{"ecosystem":"Go","package":"github.com/cortexproject/cortex","purl":"pkg:golang/github.com/cortexproject/cortex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"osv","source":"GHSA-m45g-f45x-vv22","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232"},{"type":"WEB","url":"https://github.com/cortexproject/cortex/pull/4129/files"},{"type":"WEB","url":"https://community.grafana.com/c/security-announcements"},{"type":"WEB","url":"https://github.com/cortexproject/cortex"},{"type":"WEB","url":"https://lists.cncf.io/g/cortex-users/message/50"}]},{"provider":"osv","source_id":"GO-2022-0915","relation":"self","url":"https://osv.dev/vulnerability/GO-2022-0915","license":"CC-BY-4.0","published_at":"2024-08-21T15:29:08Z","modified_at":"2026-03-03T04:51:03.443289Z","summary":"Improper input validation in CNCF Cortex in github.com/cortexproject/cortex","details":"Improper input validation in CNCF Cortex in github.com/cortexproject/cortex","severity":[],"affected":[{"ecosystem":"Go","package":"github.com/cortexproject/cortex","purl":"pkg:golang/github.com/cortexproject/cortex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.8.1"}]}],"fixed":["1.8.1"],"provider":"osv","source":"GO-2022-0915","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-m45g-f45x-vv22"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232"},{"type":"FIX","url":"https://github.com/cortexproject/cortex/pull/4129/files"},{"type":"WEB","url":"https://github.com/cortexproject/cortex"},{"type":"WEB","url":"https://lists.cncf.io/g/cortex-users/message/50"}]},{"provider":"redhat-vex","source_id":"CVE-2021-31232","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-31232","license":"CC-BY-4.0","published_at":"2021-04-28T00:00:00Z","modified_at":"2023-04-14T12:39:49Z","summary":"cortex: Alertmanager can expose local files content via specially crafted config","details":"A flaw was found in Cortex that may allow a local attacker to obtain sensitive information. This is due to an issue in the Alertmanager when -experimental.alertmanager.enable-api is used. By using a webhook to send file content, an attacker can load any text file specified in the templates list, obtain sensitive information, and use this information to launch further attacks against the affected system.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","source":"CVE-2021-31232"},{"type":"Red Hat","score":"Moderate","source":"CVE-2021-31232"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Logging Subsystem for Red Hat OpenShift","cpe":"cpe:/a:redhat:logging:5","status":"not_affected","packages":["openshift-logging/logging-loki-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/acm-grafana-rhel8","rhacm2/acm-prometheus-rhel8","rhacm2/rbac-query-proxy-rhel8","rhacm2/thanos-receive-controller-rhel8","rhacm2/thanos-rhel7"],"package_count":5,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","cpe":"cpe:/a:redhat:enterprise_linux:8","status":"not_affected","packages":["grafana","grafana-azure-monitor","grafana-cloudwatch","grafana-elasticsearch","grafana-graphite","grafana-influxdb","grafana-loki","grafana-mssql","grafana-mysql","grafana-opentsdb","grafana-postgres","grafana-prometheus","grafana-selinux","grafana-stackdriver"],"package_count":14,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","cpe":"cpe:/a:redhat:enterprise_linux:9","status":"not_affected","packages":["grafana","grafana-selinux"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","cpe":"cpe:/a:redhat:openshift:4","status":"not_affected","packages":["openshift4/ose-cluster-monitoring-rhel9-operator","openshift4/ose-cluster-storage-operator","openshift4/ose-grafana","openshift4/ose-prometheus-rhel9-operator","openshift4/ose-thanos-rhel8"],"package_count":5,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Openshift Container Storage 4","cpe":"cpe:/a:redhat:openshift_container_storage:4","status":"affected","packages":["ocs4/mcg-rhel8-operator","ocs4/ocs-rhel8-operator"],"package_count":2,"fixed":[],"advisories":[],"note":"Out of support scope","provider":"redhat-vex","source":"CVE-2021-31232"},{"vendor":"Red Hat","product":"Red Hat Openshift Data Foundation 4","cpe":"cpe:/a:redhat:openshift_data_foundation:4","status":"not_affected","packages":["odf4/mcg-rhel9-operator","odf4/ocs-rhel9-operator","odf4/odf-rhel8-operator"],"package_count":3,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-31232"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-31232.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-31232"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1955751"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-31232"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232"},{"type":"WEB","url":"https://github.com/advisories/GHSA-m45g-f45x-vv22"}]}],"references":[{"type":"WEB","url":"https://community.grafana.com/c/security-announcements"},{"type":"WEB","url":"https://github.com/cortexproject/cortex"},{"type":"WEB","url":"https://github.com/cortexproject/cortex/pull/4129/files"},{"type":"WEB","url":"https://lists.cncf.io/g/cortex-users/message/50"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-m45g-f45x-vv22"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-31232.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-31232"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1955751"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-31232"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-31232","url":"https://www.cve.org/CVERecord?id=CVE-2021-31232","license":"CC-BY-4.0","modified_at":"2024-08-03T22:55:53.349Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-31232","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31232","relation":"self"},{"provider":"osv","source_id":"GHSA-m45g-f45x-vv22","url":"https://osv.dev/vulnerability/GHSA-m45g-f45x-vv22","license":"CC-BY-4.0","modified_at":"2024-08-21T15:58:46.171649Z","relation":"self"},{"provider":"osv","source_id":"GO-2022-0915","url":"https://osv.dev/vulnerability/GO-2022-0915","license":"CC-BY-4.0","modified_at":"2026-03-03T04:51:03.443289Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-31232","url":"https://access.redhat.com/security/cve/CVE-2021-31232","license":"CC-BY-4.0","modified_at":"2023-04-14T12:39:49Z","relation":"self"}]}
