uutils coreutils Chown and Chgrp Exit Code Mismanagement Vulnerability

Vulnerability

A vulnerability exists in the uutils coreutils 'chown' and 'chgrp' commands, specifically in the ChownExecutor component. During recursive operations, these utilities fail to return the correct exit code. The exit code reflects only the outcome of the last file processed, leading to potential security misconfigurations. If the final operation is successful, the command returns 0, even if previous ownership changes encountered permission errors. This issue can cause administrative scripts to mistakenly assume that ownership has been properly transferred across a directory.

Impact

This vulnerability can lead to incorrect assumptions about file ownership changes, potentially allowing for unauthorized access or modifications based on assumed ownership rights.

Reproduction

To reproduce this vulnerability, use the 'chown' or 'chgrp' commands with the '-R' option to perform a recursive operation. Ensure that some files in the operation encounter permission errors while others do not. After the command completes, check the exit code. It will be 0 if the last file processed was changed successfully, even if earlier files failed due to permission issues. This behavior can disrupt scripts that rely on these commands to accurately manage file ownership across directories.

Remediation

Users can manually check the exit codes of 'chown' and 'chgrp' operations to ensure that ownership changes were applied correctly, especially when using recursive options. Additionally, be cautious when scripting file management tasks that involve ownership changes, and consider implementing checks that verify ownership adjustments were successful.

Added: Apr 22, 2026, 6:28 PM
Updated: Apr 22, 2026, 6:28 PM

Vulnerability Rating

Custom Algorithm
spread
8.4
impact
0.6
exploitability
3.6
remediation
7.7
relevance
6.5
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.