Vulnerabilities in pkg:golang/github.com/aws/amazon-cloudwatch-agent

PACKAGE
Advisory Identifier: GHSA-j8x2-2m5w-j939
Advisory Summary

CVE-2022-23511 is a HIGH (CVSS 7.1) amazon cloudwatch agent for windows vulnerability (CWE-274: Improper Handling of Insufficient Privileges) affecting Github.com/aws/amazon cloudwatch agent libraries in the Go ecosystem. The issue involves amazon cloudwatch agent for windows has privilege escalation vector. Remediation is available by upgrading affected packages to version 1.247355.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/aws/amazon-cloudwatch-agent

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/aws/amazon-cloudwatch-agent. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j8x2-2m5w-j939 CVE-2022-23511 HIGH Amazon CloudWatch Agent for Windows has Privilege Escalation Vector

CVE-2022-23511 at a Glance

CVE Identifier CVE-2022-23511
GHSA Identifier GHSA-j8x2-2m5w-j939
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-274: Improper Handling of Insufficient Privileges
Affected Product Github.com/aws/amazon cloudwatch agent
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2022-23511

To remediate this vulnerability, upgrade all affected Github.com/aws/amazon cloudwatch 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/aws/amazon-cloudwatch-agent fixed: 1.247355.0
Upgrade github.com/aws/amazon-cloudwatch-agent to 1.247355.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/aws/amazon-cloudwatch-agent

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-23511, inspect your project dependencies for Github.com/aws/amazon cloudwatch agent:

inspect dependencies for github.com/aws/amazon-cloudwatch-agent

Analyze the terminal output to locate any version of Github.com/aws/amazon cloudwatch agent in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.247355.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-274: Improper Handling of Insufficient Privileges, where the product does not handle or incorrectly handles when it has insufficient privileges to perform an operation, leading to resultant weaknesses. In Github.com/aws/amazon cloudwatch 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 A privilege escalation issue exists within the Amazon CloudWatch Agent for Windows in versions up to and including v1.247354. When users trigger a repair of the Agent, a pop-up window opens with SYSTEM permissions. Users with administrative access to affected hosts may use this to create a new command prompt as NT AUTHORITY\SYSTEM. To trigger this issue, the third party must be able to access the affected host and elevate their privileges such that they’re able to trigger the agent repair process. They must also be able to install the tools required to trigger the issue. This issue does not affect the CloudWatch Agent for macOS or Linux. ### Patches Maintainers recommend that Agent users upgrade to the latest available version of the CloudWatch Agent to address this issue. ### Workarounds There is no recommended work around. Affected users must update the installed version of the CloudWatch Agent to address this issue. ### References https://github.com/aws/amazon-cloudwatch-agent/commit/6119858864c317ff26f41f576c169148d1250837 ### For more information If you have any questions or comments about this advisory, contact AWS/Amazon Security via their [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.

CVE-2022-23511 Affected Github.com/aws/amazon cloudwatch agent Versions

1 component(s)
Fixed Versions:
1.247355.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/aws/amazon-cloudwatch-agent
Go
< 1.247355.0
1.247355.0

References

Frequently Asked Questions

What is CVE-2022-23511?
CVE-2022-23511 is a security vulnerability in Github.com/aws/amazon cloudwatch agent involving Amazon CloudWatch Agent for Windows has Privilege Escalation Vector under CWE-274: Improper Handling of Insufficient Privileges.
Which Github.com/aws/amazon cloudwatch agent versions are affected?
Affected versions include releases prior to 1.247355.0 across affected packages: github.com/aws/amazon-cloudwatch-agent.
What version fixes CVE-2022-23511?
Upgrading to 1.247355.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/aws/amazon-cloudwatch-agent affected?
Yes, github.com/aws/amazon-cloudwatch-agent is affected in releases prior to 1.247355.0. Upgrade your dependency to 1.247355.0 or later.
What is the CVSS score of CVE-2022-23511?
CVE-2022-23511 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:L.
What CWE is associated with CVE-2022-23511?
CVE-2022-23511 is classified under CWE-274: Improper Handling of Insufficient Privileges (The product does not handle or incorrectly handles when it has insufficient privileges to perform an operation, leading to resultant weaknesses.).
How can I check Go dependencies for CVE-2022-23511?
Run the dependency tree command: 'inspect dependencies for github.com/aws/amazon-cloudwatch-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-j8x2-2m5w-j939",
  "modified" : "2023-04-03T19:24:00Z",
  "published" : "2022-12-12T14:38:28Z",
  "aliases" : [ "CVE-2022-23511" ],
  "summary" : "Amazon CloudWatch Agent for Windows has Privilege Escalation Vector",
  "details" : "### Impact\nA privilege escalation issue exists within the Amazon CloudWatch Agent for Windows in versions up to and including v1.247354. When users trigger a repair of the Agent, a pop-up window opens with SYSTEM permissions. Users with administrative access to affected hosts may use this to create a new command prompt as NT AUTHORITY\\SYSTEM. \n \nTo trigger this issue, the third party must be able to access the affected host and elevate their privileges such that they’re able to trigger the agent repair process. They must also be able to install the tools required to trigger the issue. \n\nThis issue does not affect the CloudWatch Agent for macOS or Linux. \n\n### Patches\nMaintainers recommend that Agent users upgrade to the latest available version of the CloudWatch Agent to address this issue. \n\n### Workarounds\nThere is no recommended work around. Affected users must update the installed version of the CloudWatch Agent to address this issue.\n\n### References\nhttps://github.com/aws/amazon-cloudwatch-agent/commit/6119858864c317ff26f41f576c169148d1250837\n\n### For more information \n \nIf you have any questions or comments about this advisory, contact AWS/Amazon Security via their [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/aws/amazon-cloudwatch-agent"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.247355.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/aws/amazon-cloudwatch-agent/security/advisories/GHSA-j8x2-2m5w-j939"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23511"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/amazon-cloudwatch-agent/commit/6119858864c317ff26f41f576c169148d1250837"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/aws/amazon-cloudwatch-agent/commit/6119858864c317ff26f41f576c169148d1250837#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/aws/amazon-cloudwatch-agent"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-274" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-12T14:38:28Z",
    "nvd_published_at" : "2022-12-12T13:15:00Z"
  }
}