Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-41090

Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack. Prior to versions 0.20.1 and 0.21.2, inline secrets defined within a metrics instance config are exposed in plaintext over two endpoints: metrics instance configs defined in the base YAML file are exposed at `/-/config` and metrics instance configs defined for the scraping service are exposed at `/agent/api/v1/configs/:key`. Inline secrets will be exposed to anyone being able to reach these endpoints. If HTTPS with client authentication is not configured, these endpoints are accessible to unauthenticated users. Secrets found in these sections are used for delivering metrics to a Prometheus Remote Write system, authenticating against a system for discovering Prometheus targets, and authenticating against a system for collecting metrics. This does not apply for non-inlined secrets, such as `*_file` based secrets. This issue is patched in Grafana Agent versions 0.20.1 and 0.21.2. A few workarounds are available. Users who cannot upgrade should use non-inline secrets where possible. Users may also desire to restrict API access to Grafana Agent with some combination of restricting the network interfaces Grafana Agent listens on through `http_listen_address` in the `server` block, configuring Grafana Agent to use HTTPS with client authentication, and/or using firewall rules to restrict external access to Grafana Agent's API.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-41090
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:20 UTC · Revision 1

Source evidence

CVE-2021-41090

core-osv · Original source

Published 8 Dec 2021, 17:15 UTC

Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack. Prior to versions 0.20.1 and 0.21.2, inline secrets defined within a metrics instance config are exposed in plaintext over two endpoints: metrics instance configs defined in the base YAML file are exposed at `/-/config` and metrics instance configs defined for the scraping service are exposed at `/agent/api/v1/configs/:key`. Inline secrets will be exposed to anyone being able to reach these endpoints. If HTTPS with client authentication is not configured, these endpoints are accessible to unauthenticated users. Secrets found in these sections are used for delivering metrics to a Prometheus Remote Write system, authenticating against a system for discovering Prometheus targets, and authenticating against a system for collecting metrics. This does not apply for non-inlined secrets, such as `*_file` based secrets. This issue is patched in Grafana Agent versions 0.20.1 and 0.21.2. A few workarounds are available. Users who cannot upgrade should use non-inline secrets where possible. Users may also desire to restrict API access to Grafana Agent with some combination of restricting the network interfaces Grafana Agent listens on through `http_listen_address` in the `server` block, configuring Grafana Agent to use HTTPS with client authentication, and/or using firewall rules to restrict external access to Grafana Agent's API.

osv:CVE-2021-41090
Complete source record
{
  "id": "825dc3ae87862e49d2126d5db26e03590fa5a9ab1e58c2db074a7fd487c4237b",
  "url": "https://osv.dev/vulnerability/CVE-2021-41090",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-41090",
    "summary": "Grafana Agent is a telemetry collector for sending metrics, logs, and trace data to the opinionated Grafana observability stack. Prior to versions 0.20.1 and 0.21.2, inline secrets defined within a metrics instance config are exposed in plaintext over two endpoints: metrics instance configs defined in the base YAML file are exposed at `/-/config` and metrics instance configs defined for the scraping service are exposed at `/agent/api/v1/configs/:key`. Inline secrets will be exposed to anyone being able to reach these endpoints. If HTTPS with client authentication is not configured, these endpoints are accessible to unauthenticated users. Secrets found in these sections are used for delivering metrics to a Prometheus Remote Write system, authenticating against a system for discovering Prometheus targets, and authenticating against a system for collecting metrics. This does not apply for non-inlined secrets, such as `*_file` based secrets. This issue is patched in Grafana Agent versions 0.20.1 and 0.21.2. A few workarounds are available. Users who cannot upgrade should use non-inline secrets where possible. Users may also desire to restrict API access to Grafana Agent with some combination of restricting the network interfaces Grafana Agent listens on through `http_listen_address` in the `server` block, configuring Grafana Agent to use HTTPS with client authentication, and/or using firewall rules to restrict external access to Grafana Agent's API.",
    "evidence": "osv:CVE-2021-41090",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2021-41090",
      "aliases": [
        "CVE-2021-41090",
        "GHSA-9c4x-5hgq-q3wh",
        "GO-2022-0305"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/grafana-cold-storage/agent",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0ef314064b06a4c308f3c1211e3d2039e6b13e0a"
                },
                {
                  "fixed": "24d3d7b48a8438d43fefc7066d317d577dafd101"
                },
                {
                  "introduced": "cb80df7a2a165565565baa7d9b7360c2fa90cf5b"
                },
                {
                  "fixed": "379cbe86bdab800e3f3695da188931af624f3a19"
                },
                {
                  "fixed": "af7fb01e31fe2d389e5f1c36b399ddc46b412b21"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:grafana:agent:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.14.0"
                      },
                      {
                        "fixed": "0.20.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:grafana:agent:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0.21.0"
                      },
                      {
                        "fixed": "0.21.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "af7fb01e31fe2d389e5f1c36b399ddc46b412b21"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "24d3d7b48a8438d43fefc7066d317d577dafd101"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.20.1"
                  },
                  {
                    "range": [
                      {
                        "fixed": "379cbe86bdab800e3f3695da188931af624f3a19"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.21.2"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.21.1",
            "v0.20.0",
            "v0.21.0",
            "v0.19.0",
            "v0.16.0",
            "v0.15.0",
            "v0.14.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41090.json"
          }
        }
      ],
      "modified": "2026-10-20T10:53:56.523269504Z",
      "provider": "osv",
      "references": [
        "https://github.com/grafana/agent/releases/tag/v0.20.1",
        "https://github.com/grafana/agent/releases/tag/v0.21.2",
        "https://github.com/grafana/agent/security/advisories/GHSA-9c4x-5hgq-q3wh",
        "https://security.netapp.com/advisory/ntap-20211229-0004/",
        "https://github.com/grafana/agent/commit/af7fb01e31fe2d389e5f1c36b399ddc46b412b21",
        "https://github.com/grafana/agent/pull/1152"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-41090",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 384780,
  "published_at": "2021-12-08T17:15:11.093+00:00"
}