uutils coreutils safety, symlink, and data-integrity batch (GHSA-v762-x3cf-5mfg et al.)¶
Signal: GitHub Security Advisories updated 2026-04-29 with a batch of uutils coreutils issues affecting destructive-operation guardrails, symlink handling, permission changes, exit-code reliability, and byte-preserving behavior.
What it is¶
The batch includes several classes that matter when Rust coreutils replaces GNU coreutils in scripts, containers, or admin workflows:
rmandchmod--preserve-rootbypasses through symlinks or non-canonical path variants (GHSA-v762-x3cf-5mfg,GHSA-9gqx-53gp-c8g3).mkfifochanging permissions on an existing path after create failure (GHSA-w8m4-4v35-v6x3).tail --follow=namecontinuing to follow a replaced symlink and disclosing sensitive target files (GHSA-xf75-659h-cgg5).chmod,chown, andchgrprecursive operations reporting success based only on the last processed file (GHSA-vp6q-mv9j-j428,GHSA-88ch-q68x-36v7).dd,comm,sort,cut, andmktempdivergences that can hide write failures, corrupt non-UTF-8 bytes, drain FIFOs, crash pipelines, or create temp files in the current directory (GHSA-wh8p-h9hw-x2mc,GHSA-rx8h-33gr-vhj9,GHSA-hwhf-8p2f-45wr,GHSA-f2jv-wjjc-2c94,GHSA-hj9r-8pfm-rmjj,GHSA-2cxp-xq3c-mjxx).mkdir -mcreating directories with default umask permissions before a laterchmod, exposing a short private-directory TOCTOU window (GHSA-vf87-345h-9qhx, CVE-2026-35353).cp -ppreserving setuid/setgid mode bits even when ownership preservation fails, unlike GNUcpguardrails (GHSA-x2wv-9p67-mh9w, CVE-2026-35350).- Cross-filesystem
mvfallback copy/delete behavior failing to preserve source ownership, breaking backup and migration assumptions (GHSA-957r-r8gc-vv3h, CVE-2026-35351). - Additional late-added copy/install/move/fifo TOCTOU and metadata-safety issues:
cp --no-dereferencechecks a source path as a symlink, then opens it withoutO_NOFOLLOW, letting a local writer swap in a symlink and leak privileged-read file contents (GHSA-hpfw-mqm3-33jh).- Recursive
cp -Rcopies character/block devices as byte streams instead of recreating device nodes, risking disk exhaustion, hangs, or broken/dev-style restores (GHSA-67hp-f6hq-2h6g). install -Dcreates parent directories and later resolves the target path again without anchoring to a directory file descriptor, enabling symlink redirection of privileged writes (GHSA-m26v-hjq3-x245).cpcreates destination files with umask-derived permissions before tightening final mode, exposing a raceable readable file descriptor for private content (GHSA-2m8x-mvfx-gwgj).- Cross-device
mvpreserves extended attributes through repeated path-based lookups, allowing swapped files to receive inconsistent security xattrs such as SELinux labels or capabilities (GHSA-x4mc-mqm7-gg39). installunlinks an existing destination and recreates it withoutO_EXCL, allowing symlink swaps to overwrite arbitrary files during privileged installs (GHSA-v24v-f45g-w7jf).-
mkfifocreates a FIFO and then path-chmods it, allowing a symlink swap to redirect the permission change to another file (GHSA-9gh9-hwpr-rvqq). -
Additional 2026-04-30 cut/env/chroot and path-safety updates:
chroot --userspecresolves users through NSS after entering attacker-writableNEWROOTbut before dropping root, allowing maliciouslibnss_*.so.2code execution as root on glibc systems (GHSA-mh5c-xrmh-m794, CVE-2026-35368).cut,env, and Unicode-handling divergences can mis-parse fields, mishandle encoding, or apply short-circuit behavior that differs from GNU assumptions (GHSA-m2pg-c7m6-77pj,GHSA-532v-xp3f-837c,GHSA-5pv5-xh52-hvrp,GHSA-fhr3-xh3q-69w6,GHSA-5v4g-vw9x-h534,GHSA-xh5h-p8c5-4w4x,GHSA-vx9m-xjwf-8cqm).- More
cp/mv/install/path workflows were updated for TOCTOU, symlink/link following, path traversal, permission preservation, and misleading UI/exit-state problems (GHSA-6g8r-74qp-6859,GHSA-4wrp-79m8-9m9p,GHSA-wq63-vh5h-pr5p,GHSA-53gr-wmf4-8hh3,GHSA-q94g-3gcf-66x7,GHSA-5hgf-628x-mcqf,GHSA-gpcg-h6x2-c26p,GHSA-7259-cwhx-3xx3,GHSA-66fx-fqv6-5wwx,GHSA-m976-87wm-48fm,GHSA-vchc-9ggh-3236,GHSA-q6m9-xj2w-xmrc,GHSA-79rc-qpw3-jv92,GHSA-ggc5-46rg-mr4v).
Affected package: Rust coreutils / uutils. Fixed versions vary; upgrade to the newest release and verify each utility used by privileged automation. Some late-added cp/mv ownership issues were still listed without a fixed version when checked.
References: https://github.com/advisories/GHSA-v762-x3cf-5mfg, https://github.com/advisories/GHSA-w8m4-4v35-v6x3, https://github.com/advisories/GHSA-9gqx-53gp-c8g3, https://github.com/advisories/GHSA-vf87-345h-9qhx, https://github.com/advisories/GHSA-x2wv-9p67-mh9w, https://github.com/advisories/GHSA-957r-r8gc-vv3h, https://github.com/advisories/GHSA-hpfw-mqm3-33jh, https://github.com/advisories/GHSA-67hp-f6hq-2h6g, https://github.com/advisories/GHSA-m26v-hjq3-x245, https://github.com/advisories/GHSA-2m8x-mvfx-gwgj, https://github.com/advisories/GHSA-x4mc-mqm7-gg39, https://github.com/advisories/GHSA-v24v-f45g-w7jf, https://github.com/advisories/GHSA-9gh9-hwpr-rvqq
July 6 filesystem, temp-file, and script-parity follow-up¶
GitHub Advisory Database published another uutils/coreutils wave on 2026-07-06 covering package-level entries for uu_rm, uu_install, uu_mktemp, uu_chmod, uu_id, uu_cut, uu_ln, uu_comm, and uu_kill: GHSA-7cr3-h577-g38j / CVE-2026-35349, GHSA-gwm6-q8ch-hcfr / CVE-2026-35356, GHSA-239g-2685-54x3 / CVE-2026-35355, GHSA-2w8r-9xj7-69j5 / CVE-2026-35342, GHSA-4c7q-4928-8445 / CVE-2026-35338, GHSA-4x34-chg5-mwjj / CVE-2026-35339, GHSA-xv5w-cw7x-72gj / CVE-2026-35371, GHSA-wv33-5pxh-r7j7 / CVE-2026-35343, GHSA-jcjr-rh8q-7xqf / CVE-2026-35373, GHSA-6gcw-w7cp-94g9 / CVE-2026-35346, and GHSA-p6rv-2qpm-fwvg / CVE-2026-35369.
Operator value stays the same: replacement utilities become attack surface when privileged shell automation assumes GNU semantics. The July 6 items sharpen these validation patterns:
| Utility | Boundary to validate | Safe proof shape |
|---|---|---|
rm --preserve-root | path-string checks can miss a symlink that resolves to / | Source review, version evidence, or mocked/container-only syscall traces. Do not run destructive root-deletion proofs. |
chmod --preserve-root | literal root checks can miss canonical equivalents such as /../ or a symlink resolving to / | Source review, wrapper-level argv evidence, or a mocked/container-only dry-run harness. Do not recursively chmod / or any shared filesystem. |
install / install -D | directory creation, unlink, and final write can happen through separate path lookups | Disposable lab tree with marker files only; prove whether a writable path component can redirect a write to another lab-owned path. |
mktemp | empty TMPDIR can move temporary files into the current working directory | Run in a throwaway project directory and show only synthetic marker files. |
chmod -R | recursive failures can be masked by a final successful entry | Lab tree with one intentionally denied path and one succeeding final path; capture exit code and stderr. |
id, cut, ln, comm | pretty-print identity, newline-delimited filtering, non-UTF-8 filenames, or lossy UTF-8 conversion can drift from GNU behavior | Compare GNU vs uutils with numeric identity controls and byte fixtures; connect drift to a concrete downstream script decision. |
kill | negative numeric arguments can cross from signal parsing into process-group targeting | Use source references or mocked syscall harnesses. Do not execute mass-signal forms on shared systems. |
cut -z -d '' -s | field-suppression and delimiter semantics can diverge in NUL-delimited pipelines | Byte-fixture comparison only; connect the mismatch to a downstream script decision before reporting impact. |
mknod / mkfifo | special-file creation, cleanup, and post-create permission/label handling can target the wrong path or leave misleading SELinux/device-node state | Disposable container or mocked syscall harness with marker paths only; never create privileged device nodes on shared hosts. |
July 6 triage additions¶
- Inventory whether target containers, CI workers, embedded appliances, or developer images use uutils instead of GNU coreutils.
- Prioritize scripts that run with elevated privileges and consume repository-controlled directories, symlinks, filenames, env vars, or record streams before calling these utilities.
- Treat utility version plus script reachability as the finding seed; package presence alone is weak evidence.
- Build proofs in disposable containers with marker-only artifacts, dry-run wrappers, byte-level diffs, and patched/GNU negative controls.
- Stop before production side effects: no destructive
rm, no mass-signalkill, no high-value path overwrite, and no real secrets in temp-file or byte-diff artifacts.
Later July 6 entries GHSA-pmfc-4wjj-gmhx / CVE-2026-35381, GHSA-r9hw-mj3w-phcq / CVE-2026-35361, and GHSA-pmf6-rcx4-v53v / CVE-2026-35341 reinforce the same rule: when scripts depend on GNU-compatible cut, mknod, or mkfifo behavior for parsing, special-file setup, labels, cleanup, or permissions, prove replacement-tool drift with byte fixtures and temp marker paths before claiming an exploitable chain.
Triage¶
- Identify hosts, containers, CI images, and embedded appliances using uutils coreutils instead of GNU coreutils.
- Prioritize privileged scripts that call
rm -R,chmod -R,chown -R,chgrp -R,mkfifo,mkdir -m,cp -p,cp -R,cp --no-dereference,install,install -D, cross-filesystemmv,chroot --userspec,cut,env,tail --follow=name,dd,sort --files0-from,comm, ormktemp. - Check whether scripts rely on GNU-compatible raw-byte behavior,
--preserve-root, recursive command exit codes, temporary private directories, or ownership/setuid/setgid preservation for safety decisions.
Mitigation¶
- Upgrade uutils coreutils to versions that include the relevant fixes; prefer a current release rather than per-utility patch assumptions.
- In privileged automation, resolve paths with device/inode checks before destructive recursive actions.
- Do not run log-following commands as root in attacker-writable directories.
- Treat recursive ownership/permission command success as untrusted until stderr and target state are verified.
- Create sensitive directories and destination files with atomic/private defaults where possible, and validate final mode/owner before writing secrets.
- Avoid path-based privileged copy/install operations in attacker-writable directories; prefer directory-file-descriptor anchored operations, no-follow opens, exclusive creation, and temporary-file-then-atomic-rename patterns.
- After
cp -p, recursivecp,install,mkfifo,chroot --userspec,cut/envparsing, or cross-devicemvin privileged automation, assert owner, group, special mode bits, device-node semantics, xattrs, and final path inode match policy before executing or exposing the destination.
Detection ideas¶
- Hunt for privileged
tail --follow=nameagainst directories writable by service users. - Search automation logs for successful recursive
chmod/chownfollowed by later permission-denied errors. - Look for temp files unexpectedly created in working directories when
TMPDIRis empty. - Monitor privileged
cp,install,mv, andmkfifouse in writable parent directories, especially when followed by unexpected reads, chmods, xattr changes, or writes outside the intended tree.
Durable lesson¶
Compatibility utilities are security boundaries when scripts use them for guardrails. Replacement implementations need adversarial parity tests, especially for symlink races, path re-resolution, raw bytes, special files and device nodes, exit codes, special mode bits, ownership/xattr preservation, temporary-directory privacy, chroot/NSS privilege transitions, and destructive-operation protections.