{"id":"GHSA-4x34-chg5-mwjj","revision":"113f81eb42c84a32adf0e91678516670","records":[{"revision":"113f81eb42c84a32adf0e91678516670","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"GHSA-4x34-chg5-mwjj","aliases":["CVE-2026-35339"],"title":"chmod: recursive mode returns exit code 0 even when some files fail (last-file-wins)","description":"In `Chmoder::chmod()` the recursive branch overwrites the running result instead of accumulating it, so the exit code reflects only the *last* file processed:\n\n```\nif self.recursive {\n    r = self.walk_dir_with_context(file, true);   // overwrites r\n} else {\n    r = self.chmod_file(file).and(r);\n}\n```\n\n**PoC:** GNU returns 1 when a file fails; uutils returns 0 if the last entry succeeds:\n\n```\n$ chmod -R 0755 chmod-bug/root chmod-bug/user  # GNU -> ret=1\n$ uutils chmod -R 0755 chmod-bug/root chmod-bug/user  # -> ret=0\n```\n\n**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.\n\n**Remediation:** Acknowledged by Canonical; fixed in commit abd581f6.\n\n---\n_Reported by Zellic in the *uutils coreutils Program Security Assessment* (prepared for Canonical, Jan 20 2026), audited commit `3a07ffc5a9bd4c283e75afa548ba1f1957bad242`. Finding 3.2. Credit: Zellic._","state":0,"publishedAt":"2026-07-06T19:27:41+00:00","modifiedAt":"2026-07-06T19:41:24.785517+00:00","affected":[{"ecosystem":"crates.io","name":"uu_chmod","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.6.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/uutils/coreutils/security/advisories/GHSA-4x34-chg5-mwjj","https://nvd.nist.gov/vuln/detail/CVE-2026-35339","https://github.com/uutils/coreutils/pull/9793","https://github.com/uutils/coreutils/commit/abd581f62e97d0b147306ac40eac13af71c6fbba","https://github.com/uutils/coreutils","https://github.com/uutils/coreutils/releases/tag/0.6.0"],"sourceUrl":"https://github.com/advisories/GHSA-4x34-chg5-mwjj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4x34-chg5-mwjj","identifiers":["GHSA-4x34-chg5-mwjj","CVE-2026-35339"]},"retained":false,"historicalAffected":[]}],"coverage":[]}