6.7medium
uutils coreutils Path-Based Safety Bypass with --preserve-root
- Severity
- 6.7medium CVSS:3.1 by canonical
- Exploit likelihood
- 0.22% (higher than 7% of CVEs)
- Published
- Last changed
- Assigned by
- canonical
- Also known as
- GHSA-7cr3-h577-g38j
Description
A vulnerability in the rm utility of uutils coreutils allows a bypass of the --preserve-root protection. The implementation uses a path-string check rather than comparing device and inode numbers to identify the root directory. An attacker or accidental user can bypass this safeguard by using a symbolic link that resolves to the root directory (e.g., /tmp/rootlink -> /), potentially leading to the unintended recursive deletion of the entire root filesystem.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| coreutils | before 0.7.0 | CVE List |
| uu_rm (crates.io) | before 0.7.0 | GitHub Advisory Database |
| uutils coreutils | before 0.7.0 | NVD |
All scores
| canonical | 6.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H |
| GitHub | 6.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H |
| NVD | 7.7high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H |
Classification
What each source says
CVE List
A vulnerability in the rm utility of uutils coreutils allows a bypass of the --preserve-root protection. The implementation uses a path-string check rather than comparing device and inode numbers to identify the root directory. An attacker or accidental user can bypass this safeguard by using a symbolic link that resolves to the root directory (e.g., /tmp/rootlink -> /), potentially leading to the unintended recursive deletion of the entire root filesystem.
GitHub Advisory Database
The --preserve-root check uses a path-string test (path.has_root() && path.parent().is_none()) rather than comparing device/inode. A symlink to / (e.g. /tmp/rootlink -> /) has a parent component, so it passes the check. GNU caches /'s dev/inode at startup and compares every traversed directory against it.
Impact: rm -rf --preserve-root on a path that resolves through a symlink to / bypasses protection and can delete system directories. Recommendation: compare each entered directory's dev/inode against cached /.
Remediation: Acknowledged by Canonical; fixed in commit 5e5968cd.
Reported by Zellic in the uutils coreutils Program Security Assessment (prepared for Canonical, Jan 20 2026), audited commit 3a07ffc5a9bd4c283e75afa548ba1f1957bad242. Finding 3.44. Credit: Zellic.
NVD (es)
Una vulnerabilidad en la utilidad rm de uutils coreutils permite eludir la protección --preserve-root. La implementación utiliza una comprobación de cadena de ruta en lugar de comparar números de dispositivo e inodo para identificar el directorio raíz. Un atacante o usuario accidental puede eludir esta salvaguarda mediante el uso de un enlace simbólico que se resuelve en el directorio raíz (p. ej., /tmp/rootlink -> /), lo que podría llevar a la eliminación recursiva no intencionada de todo el sistema de archivos raíz.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-35349 changed 2026-04-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7cr3-h577-g38j changed 2026-07-06 | CC-BY-4.0 |
| NVD | CVE-2026-35349 changed 2026-10-26 | Public domain |