Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-4x34-chg5-mwjj

Опубликовано: 06 июл. 2026
Источник: github
Github: Прошло ревью
CVSS3: 5.5

Описание

chmod: recursive mode returns exit code 0 even when some files fail (last-file-wins)

In Chmoder::chmod() the recursive branch overwrites the running result instead of accumulating it, so the exit code reflects only the last file processed:

if self.recursive { r = self.walk_dir_with_context(file, true); // overwrites r } else { r = self.chmod_file(file).and(r); }

PoC: GNU returns 1 when a file fails; uutils returns 0 if the last entry succeeds:

$ chmod -R 0755 chmod-bug/root chmod-bug/user # GNU -> ret=1 $ uutils chmod -R 0755 chmod-bug/root chmod-bug/user # -> ret=0

Impact: scripts relying on the exit code get a false success signal while some files retained restrictive/unexpected permissions, leading to access-control misconfigurations. Recommendation: accumulate errors during traversal.

Remediation: Acknowledged by Canonical; fixed in commit abd581f6.


Reported by Zellic in the uutils coreutils Program Security Assessment (prepared for Canonical, Jan 20 2026), audited commit 3a07ffc5a9bd4c283e75afa548ba1f1957bad242. Finding 3.2. Credit: Zellic.

Пакеты

Наименование

uu_chmod

rust
Затронутые версииВерсия исправления

< 0.6.0

0.6.0

EPSS

Процентиль: 4%
0.00143
Низкий

5.5 Medium

CVSS3

Дефекты

CWE-252
CWE-253
CWE-755

Связанные уязвимости

CVSS3: 5.5
ubuntu
4 месяца назад

The recursive mode (-R) of the chmod utility in uutils coreutils incorrectly handles exit codes when processing multiple files. The final return value is determined solely by the success or failure of the last file processed. This allows the command to return an exit code of 0 (success) even if errors were encountered on previous files, such as 'Operation not permitted'. Scripts relying on these exit codes may proceed under a false sense of success while sensitive files remain with restrictive or incorrect permissions.

CVSS3: 5.5
nvd
4 месяца назад

The recursive mode (-R) of the chmod utility in uutils coreutils incorrectly handles exit codes when processing multiple files. The final return value is determined solely by the success or failure of the last file processed. This allows the command to return an exit code of 0 (success) even if errors were encountered on previous files, such as 'Operation not permitted'. Scripts relying on these exit codes may proceed under a false sense of success while sensitive files remain with restrictive or incorrect permissions.

CVSS3: 5.5
debian
4 месяца назад

The recursive mode (-R) of the chmod utility in uutils coreutils incor ...

EPSS

Процентиль: 4%
0.00143
Низкий

5.5 Medium

CVSS3

Дефекты

CWE-252
CWE-253
CWE-755