# CVE-2023-30844: Mutagen list and monitor operations do not neutralize control characters in text controlled by remote endpoints

> Attackers can inject control characters via remote endpoints to corrupt terminals or potentially execute code in Mutagen synchronization tools.

- **Severity:** Low 3.0 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 May 2023
- **Updated:** 29 Jan 2025
- **Also known as:** GHSA-jmp2-wc4p-wfh2, GO-2023-1764

## What is CVE-2023-30844?

CVE-2023-30844 is a low-severity vulnerability in mutagen-io mutagen, published on 8 May 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Mutagen provides real-time file synchronization and flexible network forwarding for developers. Prior to versions 0.16.6 and 0.17.1 in `mutagen` and prior to version 0.17.1 in `mutagen-compose`, Mutagen `list` and `monitor` commands are susceptible to control characters that could be provided by remote endpoints.  This could cause terminal corruption, either intentional or unintentional, if these characters were present in error messages or file paths/names. 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, the issue could theoretically cause code execution. 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. As a workaround, avoiding synchronization of untrusted files or interaction with untrusted remote endpoints should mitigate any risk.

Weakness: CWE-116 (Improper Encoding or Escaping of Output), CWE-150 (Improper Neutralization of Escape, Meta, or Control Sequences)

## Which versions are affected by CVE-2023-30844?

8 open source packages ship an affected version, including github.com/mutagen-io/mutagen and github.com/mutagen-io/mutagen-compose. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/mutagen-io/mutagen` | Go | All versions | 0.16.6, 0.17.1 |
| `github.com/mutagen-io/mutagen` | Go | All versions | 0.16.6 |
| `github.com/mutagen-io/mutagen` | Go | All versions | 0.16.6 |
| `github.com/mutagen-io/mutagen` | Go | From 0.17.0 | 0.17.1 |
| `github.com/mutagen-io/mutagen` | Go | From 0.17.0 | 0.17.1 |
| `github.com/mutagen-io/mutagen-compose` | Go | All versions | 0.17.1 |
| `github.com/mutagen-io/mutagen-compose` | Go | All versions | 0.17.1 |
| `github.com/mutagen-io/mutagen-compose` | Go | All versions | 0.17.1 |

Products: Mutagen Mutagen, Mutagen Mutagen Compose.

## How do I fix CVE-2023-30844?

Upgrade github.com/mutagen-io/mutagen to a fixed version for your release line: 0.16.6 or 0.17.1.

## Is CVE-2023-30844 being exploited?

There is no known exploitation of CVE-2023-30844 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-30844 and fix it if it is affected.

What it is: CVE-2023-30844 is a low-severity vulnerability in mutagen-io mutagen, published on 8 May 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-30844 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/mutagen-io/mutagen (Go): affected all versions; fixed in 0.16.6, 0.17.1
- github.com/mutagen-io/mutagen (Go): affected all versions; fixed in 0.16.6
- github.com/mutagen-io/mutagen (Go): affected all versions; fixed in 0.16.6
- github.com/mutagen-io/mutagen (Go): affected from 0.17.0; fixed in 0.17.1
- github.com/mutagen-io/mutagen (Go): affected from 0.17.0; fixed in 0.17.1
- github.com/mutagen-io/mutagen-compose (Go): affected all versions; fixed in 0.17.1
- github.com/mutagen-io/mutagen-compose (Go): affected all versions; fixed in 0.17.1
- github.com/mutagen-io/mutagen-compose (Go): affected all versions; fixed in 0.17.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-30844/ (Markdown: https://insights.sbomify.com/CVE-2023-30844/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-30844
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-30844
- OSV: https://osv.dev/vulnerability/CVE-2023-30844

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-30844/
Summaries are generated and may contain mistakes; the official description above is the record.
