github.com/grafana/agent
Affected
- introduced
0.14.0, fixed0.21.2(semver)
Fixed versions
0.21.2
Fix
- Fixed version
0.21.2go get github.com/grafana/[email protected]
Advisory
Also known as: CVE-2021-41090, GO-2022-0305
Instance config inline secret exposure in Grafana
Impact
Some inline secrets are exposed in plaintext over the Grafana Agent HTTP server:
/-/config /-/config/-/config./-/config./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:
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:
http_listen_address in the server block. 127.0.0.1 is the most restrictive, 0.0.0.0 is the default. Medium Basis: The source's own band: MODERATE
0.14.0, fixed 0.21.2 (semver)0.21.2
0.21.2go get github.com/grafana/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0