Executive brief
The mkdir utility in uutils coreutils, a Rust-based implementation of standard system tools, contains a flaw when creating new folders with specific security settings. When a user creates a private folder, the tool briefly creates it with default public permissions before restricting them. In shared computing environments, this creates a split-second window where an unauthorized user could access sensitive data intended to be private.
Technical details
A Time-of-Check Time-of-Use (TOCTOU) race condition exists in the uutils coreutils 'mkdir' implementation when the '-m' (mode) flag is used. The utility originally performed two separate operations: a 'mkdir' syscall using default umask-derived permissions (often 0755), followed by a 'chmod' syscall to apply the user-requested mode. This sequence leaves a race window where the directory is accessible to other local users with broader permissions than intended. The vulnerability was fixed in version 0.6.0 by adopting the GNU coreutils approach: temporarily setting the process umask to 0 to allow the 'mkdir' syscall to create the directory atomically with the final requested permissions.
Affected products
- uutils coreutils (uu_mkdir) < 0.6.0
Timeline
- 2026-01-03: other: Fix proposed in pull request #10036
- 2026-01-18: patched: Fix merged into main branch
- 2026-05-30: advisory: GitHub Advisory published
- 2026-07-06: disclosed: Advisory reviewed and updated
References
- https://github.com/uutils/coreutils/security/advisories/GHSA-mj6p-44ch-cq69
- https://github.com/uutils/coreutils/pull/10036
- https://github.com/uutils/coreutils/commit/037b9583bc03d814e8516df54ebcda6f681fe1f8
- https://github.com/uutils/coreutils/releases/tag/0.6.0
- https://api.github.com/repos/uutils/coreutils/security-advisories/GHSA-mj6p-44ch-cq69