CVE-2022-46156 Grafana's default installation of `synthetic-monitoring-agent` exposes sensitive information

High 7.2 Published Updated

Attackers can retrieve sensitive API tokens from a debugging endpoint, allowing unauthorized access to monitoring checks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-46156?

CVE-2022-46156 is a high-severity vulnerability in grafana synthetic-monitoring-agent, published on 30 Nov 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The Synthetic Monitoring Agent for Grafana's Synthetic Monitoring application provides probe functionality and executes network checks for monitoring remote targets. Users running the Synthetic Monitoring agent prior to version 0.12.0 in their local network are impacted. The authentication token used to communicate with the Synthetic Monitoring API is exposed through a debugging endpoint. This token can be used to retrieve the Synthetic Monitoring checks created by the user and assigned to the agent identified with that token. The Synthetic Monitoring API will reject connections from already-connected agents, so access to the token does not guarantee access to the checks. Version 0.12.0 contains a fix. Users are advised to rotate the agent tokens. After upgrading to version v0.12.0 or later, it's recommended that users of distribution packages review the configuration stored in `/etc/synthetic-monitoring/synthetic-monitoring-agent.conf`, specifically the `API_TOKEN` variable which has been renamed to `SM_AGENT_API_TOKEN`. As a workaround for previous versions, it's recommended that users review the agent settings and set the HTTP listening address in a manner that limits the exposure, for example, localhost or a non-routed network, by using the command line parameter `-listen-address`, e.g. `-listen-address localhost:4050`.

Weakness: CWE-749, CWE-489

Which versions are affected by CVE-2022-46156?

5 open source packages ship an affected version, including github.com/grafana/synthetic-monitoring-agent and github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent. It affects 1 product.

PackageAffectedFixed in
github.com/grafana/synthetic-monitoring-agent GoAll versions0.12.0
github.com/grafana/synthetic-monitoring-agent GoAll versions0.12.0
github.com/grafana/synthetic-monitoring-agent GoAll versions0.12.0
github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent GoAll versions0.12.0
github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent GoAll versions0.12.0

Products include Grafana Synthetic Monitoring Agent.

How do I fix CVE-2022-46156?

Upgrade github.com/grafana/synthetic-monitoring-agent to 0.12.0 or later.

Is CVE-2022-46156 being exploited?

There is no known exploitation of CVE-2022-46156 in the wild and no public exploit code.

Sources

Also known as GHSA-9j4f-f249-q5w8, GO-2022-1132.

Is CVE-2022-46156 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free