# GHSA-fqf6-gxhh-2xhw: uutils coreutils: cp/install/mv/ln --suffix alone does not enable backup mode (silent data loss vs GNU)

> Using --suffix without --backup in uutils coreutils fails to create backups, causing silent data loss during file overwrites.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 7 Jul 2026

## What is GHSA-fqf6-gxhh-2xhw?

GHSA-fqf6-gxhh-2xhw is a vulnerability in uucore, published on 7 Jul 2026. 

### Official description

`determine_backup_mode` in `src/uucore/src/lib/features/backup_control.rs` only checks `--backup`/`-b` and returns `BackupMode::None` when only `--suffix` is given. GNU enables backup mode when `--suffix` is used alone (defaulting to existing/numbered, or `$VERSION_CONTROL`). Affects `cp`, `install`, `mv`, `ln` which share this code.

```
# uutils: no backup created
$ coreutils cp --suffix=.bak src dest      # dest.bak NOT created
# GNU: dest.bak created
$ cp --suffix=.bak src dest
```

**Impact:** users/scripts relying on `--suffix` to back up a file before overwrite get silent data loss; breaks GNU compatibility across four utilities. Recommendation: enable backup mode when `--suffix` is present.

_Note: this is primarily a GNU-compatibility/data-safety divergence rather than a classic exploitable vulnerability — review whether it warrants a CVE._

**Remediation:** Acknowledged by Canonical; fixed in PR #9741 (`uucore: use --suffix to enable backup mode`), commit `939ab037a`, merged 2025-12-21. `determine_backup_mode` now has a `--suffix`-alone branch that resolves the mode from `$VERSION_CONTROL` (defaulting to `existing`). Released in **uucore 0.6.0** and later (vulnerable: `< 0.6.0`). Regression tests added in the same file: `test_backup_mode_suffix_without_backup_option` and `test_backup_mode_suffix_without_backup_option_with_env_var`.

---
_Reported by Zellic in the *uutils coreutils Program Security Assessment* (prepared for Canonical, Jan 20 2026), audited commit `3a07ffc5a9bd4c283e75afa548ba1f1957bad242`. Finding 3.7. Credit: Zellic._

## Which versions are affected by GHSA-fqf6-gxhh-2xhw?

2 open source packages ship an affected version, including uucore.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `uucore` | crates.io | All versions | 0.6.0 |
| `uucore` | crates.io | All versions | 0.6.0 |

## How do I fix GHSA-fqf6-gxhh-2xhw?

Upgrade uucore to 0.6.0 or later.

## Is GHSA-fqf6-gxhh-2xhw being exploited?

There is no known exploitation of GHSA-fqf6-gxhh-2xhw in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-fqf6-gxhh-2xhw and fix it if it is affected.

What it is: GHSA-fqf6-gxhh-2xhw is a vulnerability in uucore, published on 7 Jul 2026. 
Exploitation: There is no known exploitation of GHSA-fqf6-gxhh-2xhw in the wild and no public exploit code.

Affected packages and fixed versions:
- uucore (crates.io): affected all versions; fixed in 0.6.0
- uucore (crates.io): affected all versions; fixed in 0.6.0

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/GHSA-fqf6-gxhh-2xhw/ (Markdown: https://insights.sbomify.com/GHSA-fqf6-gxhh-2xhw/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-fqf6-gxhh-2xhw

---
From sbomify Insights: https://insights.sbomify.com/GHSA-fqf6-gxhh-2xhw/
Summaries are generated and may contain mistakes; the official description above is the record.
