Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

Instance config inline secret exposure in GrafanaGHSA-9c4x-5hgq-q3wh

MEDIUMFix: grafana/agent#1152

GHSA-9c4x-5hgq-q3wh is a medium-severity (CVSS 6.5) Information Exposure vulnerability in github.com/grafana/agent. A fix is available for github.com/grafana/agent — see the affected versions and patch details below.

Also known asCVE-2021-41090GO-2022-0305
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 12, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk+0.02%
Lower risk than most CVEs54th percentile — riskier than 54% of all scored CVEsHighest risk
0.24%0.58%0.93%1.28%0.8%0.7%0.7%0.8%Jun 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-9c4x-5hgq-q3wh by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹github.com/grafana/agent

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Impact

Some inline secrets are exposed in plaintext over the Grafana Agent HTTP server:

  • Inline secrets for metrics instance configs in the base YAML file are exposed at /-/config
  • Inline secrets for integrations are exposed at /-/config
  • Inline secrets for Consul ACL tokens and ETCD basic auth when configured for the scraping service at /-/config.
  • Inline secrets for the Kafka receiver for OpenTelemetry-Collector tracing at /-/config.
  • Inline secrets for metrics instance configs loaded from the scraping service are exposed at /agent/api/v1/configs/{name}.

Inline secrets will be exposed to anyone being able to reach these endpoints.

Secrets found in these sections are used for:

  • Delivering metrics to a Prometheus Remote Write system
  • Authenticating against a system for discovering Prometheus targets
  • Authenticating against a system for collecting metrics (scrape_configs and integrations)
  • Authenticating against a Consul or ETCD for storing configurations to distribute in scraping service mode
  • Authenticating against Kafka for receiving traces

Non-inlined secrets, such as *_file-based secrets, are not impacted by this vulnerability.

Patches

Download v0.20.1 or any version past v0.21.2 to patch Grafana Agent. These patches obfuscate the listed impacted secrets from the vulnerable endpoints.

The patches also disable the endpoints by default. Pass the command-line flag --config.enable-read-api to opt-in and re-enable the endpoints.

Workarounds

If for some reason you cannot upgrade, use non-inline secrets where possible. Not all configuration options may have a non-inline equivalent.

You also may desire to restrict API access to Grafana Agent, with some combination of:

  • Restrict network interfaces Grafana Agent listens on through http_listen_address in the server block. 127.0.0.1 is the most restrictive, 0.0.0.0 is the default.
  • Configure Grafana Agent to use HTTPS with client authentication.
  • Use firewall rules to restrict external access to Grafana Agent's API.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/grafana/agent≥ 0.14.0&&< 0.21.20.21.2go get github.com/grafana/agent@v0.21.2

Affected Products

1 product · 2 configurations
Application
agentgrafana
≥ 0.21.0 && < 0.21.2
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/grafana/agent, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/grafana/agent to 0.21.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-9c4x-5hgq-q3wh is resolved across your whole dependency graph.

  3. Workarounds

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

Frequently Asked Questions

### Impact Some inline secrets are exposed in plaintext over the Grafana Agent HTTP server: * Inline secrets for metrics instance configs in the base YAML file are exposed at `/-/config` * Inline secrets for integrations are exposed at `/-/config` * Inline secrets for Consul ACL tokens and ETCD basic auth when configured for the scraping service at `/-/config`. * Inline secrets for the Kafka receiver for OpenTelemetry-Collector tracing at `/-/config`. * Inline secrets for metrics instance configs loaded from the scraping service are exposed at `/agent/api/v1/configs/{name}`. Inline secrets
O3 Security · Impact-Aware SCA

Is GHSA-9c4x-5hgq-q3wh in your dependencies?

Find it across Go, including transitive dependencies.

Instance config inline secret exposure in Grafana