Vulnerabilities in pkg:golang/github.com/mutagen-io/mutagen-compose

PACKAGE
Advisory Identifier: GHSA-jmp2-wc4p-wfh2
Advisory Summary

CVE-2023-30844 is a LOW (CVSS 3.0) mutagen list and monitor operations vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Github.com/mutagen io/mutagen libraries in the Go ecosystem. The issue involves mutagen list and monitor operations do not neutralize control characters in text controlled by remote endpoints. Remediation is available by upgrading affected packages to version 0.16.6, 0.17.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/mutagen-io/mutagen-compose

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/mutagen-io/mutagen-compose. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-jmp2-wc4p-wfh2 CVE-2023-30844 LOW Mutagen list and monitor operations do not neutralize control characters in text controlled by remote endpoints

CVE-2023-30844 at a Glance

CVE Identifier CVE-2023-30844
GHSA Identifier GHSA-jmp2-wc4p-wfh2
Severity LOW
CVSS v3.1 Base Score 3.0
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Github.com/mutagen io/mutagen
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 3.0

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:N/I:L/A:N).

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 None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2023-30844

To remediate this vulnerability, upgrade all affected Github.com/mutagen io/mutagen 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/mutagen-io/mutagen fixed: 0.16.6
Upgrade github.com/mutagen-io/mutagen to 0.16.6
github.com/mutagen-io/mutagen-compose fixed: 0.17.1
Upgrade github.com/mutagen-io/mutagen-compose to 0.17.1
github.com/mutagen-io/mutagen fixed: 0.17.1
Upgrade github.com/mutagen-io/mutagen to 0.17.1
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/mutagen-io/mutagen

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-30844, inspect your project dependencies for Github.com/mutagen io/mutagen:

inspect dependencies for github.com/mutagen-io/mutagen

Analyze the terminal output to locate any version of Github.com/mutagen io/mutagen in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.16.6), 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Github.com/mutagen io/mutagen, 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 Mutagen command line operations, as well as the log output from `mutagen daemon run`, are susceptible to control characters that could be provided by remote endpoints. This can cause terminal corruption, either intentional or unintentional, if these characters are present in error messages, file paths/names, and/or log output. This could be used as an attack vector if synchronizing with an untrusted remote endpoint, synchronizing files not under control of the user, or forwarding to/from an untrusted remote endpoint. On very old systems with terminals susceptible to issues such as [CVE-2003-0069](https://nvd.nist.gov/vuln/detail/CVE-2003-0069), the issue could theoretically cause code execution. ### Patches The problem has been patched in Mutagen v0.16.6 and v0.17.1. Earlier versions of Mutagen are no longer supported and will not be patched. Versions of Mutagen after v0.18.0 will also have the patch merged. One caveat is that the templating functionality of Mutagen's `list` and `monitor` commands has been only partially patched. In particular, the `json` template function already provided escaping and no patching was necessary. However, raw template output has been left unescaped because this raw output may be necessary for commands which embed Mutagen. To aid these commands, a new `shellSanitize` template function has been added which provides control character neutralization in strings. ### Workarounds Avoiding synchronization of untrusted files or interaction with untrusted remote endpoints should mitigate any risk. ### References A similar issue can be seen in kubernetes/kubernetes#101695.

CVE-2023-30844 Affected Github.com/mutagen io/mutagen Versions

3 component(s)
Fixed Versions:
0.16.60.17.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/mutagen-io/mutagen
Go
< 0.16.6
0.16.6
github.com/mutagen-io/mutagen-compose
Go
< 0.17.1
0.17.1
github.com/mutagen-io/mutagen
Go
≥ 0.17.0
< 0.17.1
0.17.1

References

Frequently Asked Questions

What is CVE-2023-30844?
CVE-2023-30844 is a security vulnerability in Github.com/mutagen io/mutagen involving Mutagen list and monitor operations do not neutralize control characters in text controlled by remote endpoints under CWE-116: Improper Encoding or Escaping of Output.
Which Github.com/mutagen io/mutagen versions are affected?
Affected versions include releases prior to 0.16.6, 0.17.1 across affected packages: github.com/mutagen-io/mutagen, github.com/mutagen-io/mutagen-compose.
What version fixes CVE-2023-30844?
Upgrading to 0.16.6, 0.17.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/mutagen-io/mutagen affected?
Yes, github.com/mutagen-io/mutagen is affected in releases prior to 0.16.6, 0.17.1. Upgrade your dependency to 0.16.6, 0.17.1 or later.
Is github.com/mutagen-io/mutagen-compose affected?
Yes, github.com/mutagen-io/mutagen-compose is affected in releases prior to 0.17.1. Upgrade your dependency to 0.17.1 or later.
What is the CVSS score of CVE-2023-30844?
CVE-2023-30844 has a CVSS v3.1 base score of 3.0 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N.
What CWE is associated with CVE-2023-30844?
CVE-2023-30844 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check Go dependencies for CVE-2023-30844?
Run the dependency tree command: 'inspect dependencies for github.com/mutagen-io/mutagen'. 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-jmp2-wc4p-wfh2",
  "modified" : "2023-05-05T02:25:00Z",
  "published" : "2023-05-05T02:25:00Z",
  "aliases" : [ "CVE-2023-30844" ],
  "summary" : "Mutagen list and monitor operations do not neutralize control characters in text controlled by remote endpoints",
  "details" : "### Impact\n\nMutagen command line operations, as well as the log output from `mutagen daemon run`, are susceptible to control characters that could be provided by remote endpoints.  This can cause terminal corruption, either intentional or unintentional, if these characters are present in error messages, file paths/names, and/or log output.  This could be used as an attack vector if synchronizing with an untrusted remote endpoint, synchronizing files not under control of the user, or forwarding to/from an untrusted remote endpoint.  On very old systems with terminals susceptible to issues such as [CVE-2003-0069](https://nvd.nist.gov/vuln/detail/CVE-2003-0069), the issue could theoretically cause code execution.\n\n\n### Patches\n\nThe problem has been patched in Mutagen v0.16.6 and v0.17.1.  Earlier versions of Mutagen are no longer supported and will not be patched.  Versions of Mutagen after v0.18.0 will also have the patch merged.\n\nOne caveat is that the templating functionality of Mutagen's `list` and `monitor` commands has been only partially patched.  In particular, the `json` template function already provided escaping and no patching was necessary.  However, raw template output has been left unescaped because this raw output may be necessary for commands which embed Mutagen.  To aid these commands, a new `shellSanitize` template function has been added which provides control character neutralization in strings.\n\n\n### Workarounds\n\nAvoiding synchronization of untrusted files or interaction with untrusted remote endpoints should mitigate any risk.\n\n\n### References\n\nA similar issue can be seen in kubernetes/kubernetes#101695.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/mutagen-io/mutagen"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.16.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/mutagen-io/mutagen-compose"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.17.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/mutagen-io/mutagen"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.17.0"
      }, {
        "fixed" : "0.17.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mutagen-io/mutagen/security/advisories/GHSA-jmp2-wc4p-wfh2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30844"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mutagen-io/mutagen"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mutagen-io/mutagen/releases/tag/v0.16.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mutagen-io/mutagen/releases/tag/v0.17.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116", "CWE-150" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-05-05T02:25:00Z",
    "nvd_published_at" : "2023-05-08T18:15:14Z"
  }
}