CVE-2022-46156: Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent Default Installation Of `synthetic-monitoring-agent` Exposes Vulnerability
MODERATECVE-2022-46156 is a MODERATE (CVSS 7.2) default installation of `synthetic-monitoring-agent` exposes vulnerability (CWE-489: Active Debug Code) affecting Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent libraries in the Go ecosystem. The issue involves default installation of `synthetic-monitoring-agent` exposes sensitive information. Remediation is available by upgrading affected packages to version 0.12.0.
CVE-2022-46156 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N).
How to Fix CVE-2022-46156
To remediate this vulnerability, upgrade all affected Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent to 0.12.0
Upgrade github.com/grafana/synthetic-monitoring-agent to 0.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-46156, inspect your project dependencies for Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent:
inspect dependencies for github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent
Analyze the terminal output to locate any version of Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-489: Active Debug Code, where the product is released with debugging code still enabled or active. In Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-46156 Affected Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent
|
Go |
< 0.12.0
|
0.12.0
|
|
github.com/grafana/synthetic-monitoring-agent
|
Go |
< 0.12.0
|
0.12.0
|
References
Frequently Asked Questions
What is CVE-2022-46156?
Which Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent versions are affected?
What version fixes CVE-2022-46156?
Is github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent affected?
Is github.com/grafana/synthetic-monitoring-agent affected?
What is the CVSS score of CVE-2022-46156?
What CWE is associated with CVE-2022-46156?
How can I check Go dependencies for CVE-2022-46156?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9j4f-f249-q5w8",
"modified" : "2024-11-18T16:27:10Z",
"published" : "2024-09-06T21:37:02Z",
"aliases" : [ "CVE-2022-46156" ],
"summary" : "Default installation of `synthetic-monitoring-agent` exposes sensitive information",
"details" : "### Impact\n\nUsers 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.\n\n### Patches\n\nFixed version is v0.12.0\n\nUsers are advised to rotate the agent tokens.\n\nAfter 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`.\n\n### Workarounds\n\nWith 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`.\n\n### References\n\nThe following changes have been made to address this issue:\n\n- [Disable debug endpoint by default](https://github.com/grafana/synthetic-monitoring-agent/pull/373)\n- [Allow retrieving the token from the environment](https://github.com/grafana/synthetic-monitoring-agent/pull/374)\n- [Default to listening on localhost](https://github.com/grafana/synthetic-monitoring-agent/pull/375)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* You can use the [Synthetic Monitoring Agent discussions](https://github.com/grafana/synthetic-monitoring-agent/discussions).\n* Issues should be reported in the [Synthetic Monitoring Agent issues](https://github.com/grafana/synthetic-monitoring-agent/issues).\n* Email us at [security@grafana.com](mailto:security@grafana.com).\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/synthetic-monitoring-agent"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/security/advisories/GHSA-9j4f-f249-q5w8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-46156"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/pull/373"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/pull/374"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/pull/375"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/commit/d8dc7f9c1c641881cbcf0a09e178b90ebf0f0228"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/grafana/synthetic-monitoring-agent"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/synthetic-monitoring-agent/releases/tag/v0.12.0"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-1132"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-489", "CWE-749" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-06T21:37:02Z",
"nvd_published_at" : "2022-11-30T22:15:00Z"
}
}