Vulnerabilities in pkg:golang/github.com/grafana/synthetic-monitoring-agent

PACKAGE
Advisory Identifier: GHSA-9j4f-f249-q5w8
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/grafana/synthetic-monitoring-agent

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/grafana/synthetic-monitoring-agent. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9j4f-f249-q5w8 CVE-2022-46156 MODERATE Default installation of `synthetic-monitoring-agent` exposes sensitive information

CVE-2022-46156 at a Glance

CVE Identifier CVE-2022-46156
GHSA Identifier GHSA-9j4f-f249-q5w8
Severity MODERATE
CVSS v3.1 Base Score 7.2
CWE Classification CWE-489: Active Debug Code
Affected Product Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent fixed: 0.12.0
Upgrade github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent to 0.12.0
github.com/grafana/synthetic-monitoring-agent fixed: 0.12.0
Upgrade github.com/grafana/synthetic-monitoring-agent to 0.12.0
Verify Direct and Transitive Dependencies

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

### 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](https://github.com/grafana/synthetic-monitoring-agent/pull/373) - [Allow retrieving the token from the environment](https://github.com/grafana/synthetic-monitoring-agent/pull/374) - [Default to listening on localhost](https://github.com/grafana/synthetic-monitoring-agent/pull/375) ### For more information If you have any questions or comments about this advisory: * You can use the [Synthetic Monitoring Agent discussions](https://github.com/grafana/synthetic-monitoring-agent/discussions). * Issues should be reported in the [Synthetic Monitoring Agent issues](https://github.com/grafana/synthetic-monitoring-agent/issues). * Email us at [security@grafana.com](mailto:security@grafana.com).

CVE-2022-46156 Affected Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent Versions

2 component(s)
Fixed Versions:
0.12.0
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?
CVE-2022-46156 is a security vulnerability in Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent involving Default installation of `synthetic-monitoring-agent` exposes sensitive information under CWE-489: Active Debug Code.
Which Github.com/grafana/synthetic monitoring agent/cmd/synthetic monitoring agent versions are affected?
Affected versions include releases prior to 0.12.0 across affected packages: github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent, github.com/grafana/synthetic-monitoring-agent.
What version fixes CVE-2022-46156?
Upgrading to 0.12.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent affected?
Yes, github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
Is github.com/grafana/synthetic-monitoring-agent affected?
Yes, github.com/grafana/synthetic-monitoring-agent is affected in releases prior to 0.12.0. Upgrade your dependency to 0.12.0 or later.
What is the CVSS score of CVE-2022-46156?
CVE-2022-46156 has a CVSS v3.1 base score of 7.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2022-46156?
CVE-2022-46156 is classified under CWE-489: Active Debug Code (The product is released with debugging code still enabled or active.).
How can I check Go dependencies for CVE-2022-46156?
Run the dependency tree command: 'inspect dependencies for github.com/grafana/synthetic-monitoring-agent/cmd/synthetic-monitoring-agent'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}