PT-2021-23081 · Grafana · Grafana Agent

Rfratto

·

Published

2021-12-08

·

Updated

2024-08-21

·

CVE-2021-41090

CVSS v3.1

6.5

Medium

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions Grafana Agent versions prior to 0.20.1 and 0.21.2
Description The issue concerns the exposure of inline secrets in plaintext over two endpoints: /-/config for metrics instance configs defined in the base YAML file and /agent/api/v1/configs/:key for metrics instance configs defined for the scraping service. These secrets 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. The exposure occurs when HTTPS with client authentication is not configured, making the endpoints accessible to unauthenticated users. Non-inlined secrets, such as * file based secrets, are not impacted.
Recommendations For versions prior to 0.20.1 and 0.21.2, use non-inline secrets where possible. Restrict API access to Grafana Agent by restricting the network interfaces it listens on through http listen address in the server block. Configure Grafana Agent to use HTTPS with client authentication. Use firewall rules to restrict external access to Grafana Agent's API. Upgrade to version 0.20.1 or any version past 0.21.2 to patch the issue.

Fix

Cleartext Storage of Sensitive Information

Information Disclosure

Weakness Enumeration

Related Identifiers

CVE-2021-41090
GHSA-9C4X-5HGQ-Q3WH
GO-2022-0305

Affected Products

Grafana Agent