CVE-2022-46156 is a high-severity (CVSS 7.2) CWE-489 vulnerability in github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent. A fix is available for github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent — see the affected versions and patch details below.
Grafana's default installation of `synthetic-monitoring-agent` exposes sensitive information
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent🐹github.com/grafana/synthetic-monitoring-agentReal-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
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 API_TOKEN variable which has been renamed to SM_AGENT_API_TOKEN.
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 [email protected].
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent | all versions | 0.12.0go get github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent@v0.12.0 |
| 🐹Go | github.com/grafana/synthetic-monitoring-agent | all versions | 0.12.0go get github.com/grafana/synthetic-monitoring-agent@v0.12.0 |
Affected Products
synthetic monitoring agentgrafanaDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent to 0.12.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-46156 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2022-46156 in your dependencies?
Find it across Go, including transitive dependencies.