CVE-2021-31231 in Grafana Enterprise Metrics
The Alertmanager in Grafana Enterprise Metrics before 1.2.1 and Metrics Enterprise 1.2.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 ca...
Affects 1 product from 1 vendor. Facts below cite their sources.
Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Grafana | Enterprise Metrics | < 1.2.1 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
The Alertmanager in Grafana Enterprise Metrics before 1.2.1 and Metrics Enterprise 1.2.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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2021-31231 |
|---|---|
| BreachSpider ID | BS-2021-GLOBAL-079218-M |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| Published | 2021-04-30 |
| Last modified | 2026-06-17 |
| Source | NVD |
Analysis AI-written, not human-reviewed
A local file disclosure vulnerability exists in the Alertmanager component of Grafana Enterprise Metrics and Metrics Enterprise versions prior to 1.2.1. This vulnerability can be exploited to disclose the contents of arbitrary files on the server.
The vulnerability can be exploited by using the experimental.alertmanager.enable-api feature. An attacker can leverage the HTTP basic auth password_file or alertmanager templates to send the contents of any file via a webhook.
Questions
What is CVE-2021-31231?
A local file disclosure vulnerability exists in the Alertmanager component of Grafana Enterprise Metrics and Metrics Enterprise versions prior to 1.2.1. This vulnerability can be exploited to disclose the contents of arbitrary files on the server.
What is the CVSS score for CVE-2021-31231?
CVE-2021-31231 has CVSS 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N. EPSS: 0.3%.
Is CVE-2021-31231 actively exploited?
No confirmed active exploitation of CVE-2021-31231 as of 2026-09-25.
How do I remediate CVE-2021-31231?
Priority: MEDIUM. PSIRT: [email protected]
What systems are affected by CVE-2021-31231?
CVE-2021-31231 affects Grafana Enterprise Metrics.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Grafana","product":"Enterprise Metrics","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.