CVE-2022-46156: Grafana's default installation of `synthetic-monitoring-agent` exposes sensitive information
Impact
Users running the Synthetic Monitoring agent in their local network are impacted. The authentication token used to communicate with the Synthetic Monitoring API is exposed thru 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.
Patches
Fixed version is v0.12.0
Users are advised to rotate the agent tokens.
After upgrading to version v0.12.0 or later, it's recommended that user's of distribution packages (e.g. Debian or RedHat and their derivatives) review the configuration stored in /etc/synthetic-monitoring/synthetic-monitoring-agent.conf, specifically the APITOKEN variable which has been renamed to SMAGENTAPITOKEN.
Workarounds
With all 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.
References
The following changes have been made to address this issue:
- Disable debug endpoint by default - Allow retrieving the token from the environment - Default to listening on localhost
For more information
If you have any questions or comments about this advisory: You can use the Synthetic Monitoring Agent discussions. Issues should be reported in the Synthetic Monitoring Agent issues. Email us at security@grafana.com.
Other sources
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 APITOKEN variable which has been renamed to SMAGENTAPITOKEN. 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.
— NVD
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2022-46156?
CVE-2022-46156 is a vulnerability in the Synthetic Monitoring Agent for Grafana's Synthetic Monitoring application that allows unauthorized access to the agent.
How does CVE-2022-46156 affect users?
Users running the Synthetic Monitoring Agent prior to version 0.12.0 in their local network are impacted by CVE-2022-46156.
What is the severity of CVE-2022-46156?
The severity of CVE-2022-46156 is high with a severity value of 3.3.
How do I fix CVE-2022-46156?
To fix CVE-2022-46156, users should update their Synthetic Monitoring Agent to version 0.12.0 or newer.
What is the Common Weakness Enumeration (CWE) ID for CVE-2022-46156?
The Common Weakness Enumeration (CWE) ID for CVE-2022-46156 is CWE-489 and CWE-749.