{"id":"CVE-2026-35339","aliases":["DEBIAN-CVE-2026-35339","EUVD-2026-24965","GHSA-4x34-chg5-mwjj","GHSA-vp6q-mv9j-j428","UBUNTU-CVE-2026-35339"],"status":"published","title":"uutils coreutils chmod False Success Exit Code in Recursive Mode","description":"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.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00143,"percentile":0.03619,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-252","CWE-253","CWE-755"],"published":"2026-04-22T16:07:33Z","modified":"2026-10-28T02:30:45Z","fixes":[{"ecosystem":"crates.io","package":"uu_chmod","fixed_in":["0.6.0"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"rust-coreutils","fixed_in":["0.6.0-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"uu_chmod","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.0"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"rust-coreutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0.17-2","0.0.17-3","0.0.17-4","0.0.17-5","0.0.17-6","0.0.19-1","0.0.19-2","0.0.19-3","0.0.20-1","0.0.21-1","0.0.22-1","0.0.23-1","0.0.23-2","0.0.23-3","0.0.24-1","0.0.24-2","0.0.26-1","0.0.26-2","0.0.26-3","0.0.26-4","0.0.26-5","0.0.27-1","0.0.27-2","0.0.27-3","0.0.30-1","0.0.30-2","0.0.30-3","0.0.30-3~exp1","0.0.30-4","0.10.0-1","0.11.0-1","0.11.0-2","0.12.0-1","0.6.0-1","0.7.0-1","0.8.0-1","0.8.0-2","0.8.0-3","0.8.0-4","0.8.0-5","0.8.0-6","0.9.0-1","0.9.0-2","0.9.0-3"]},{"source":"osv","ecosystem":"Debian:13","package":"rust-coreutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0.30-2","0.0.30-3","0.0.30-3~exp1","0.0.30-4","0.10.0-1","0.11.0-1","0.11.0-2","0.12.0-1","0.6.0-1","0.7.0-1","0.8.0-1","0.8.0-2","0.8.0-3","0.8.0-4","0.8.0-5","0.8.0-6","0.9.0-1","0.9.0-2","0.9.0-3"]},{"source":"osv","ecosystem":"Debian:14","package":"rust-coreutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.6.0-1"}]}],"versions":["0.0.30-2","0.0.30-3","0.0.30-3~exp1","0.0.30-4"]},{"source":"osv","ecosystem":"crates.io","package":"uu_chmod","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rust-coreutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0.20-1","0.0.22-1","0.0.23-1","0.0.23-2","0.0.23-3","0.0.24-1","0.0.24-2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rust-coreutils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.0.30-1","0.0.30-2","0.0.30-2ubuntu2","0.1.0-0ubuntu1","0.1.0+git20250711.2ba3a33-0ubuntu1","0.1.0+git20250711.2ba3a33-0ubuntu2","0.1.0+git20250711.2ba3a33-0ubuntu3","0.1.0+git20250711.2ba3a33-0ubuntu4","0.1.0+git20250801.cf79675-0ubuntu1","0.1.0+git20250813.4af2a84-0ubuntu2","0.1.0+git20250813.4af2a84-0ubuntu4","0.1.0+git20250813.4af2a84-0ubuntu6","0.1.0+git20250813.4af2a84-0ubuntu7","0.2.2-0ubuntu1","0.2.2-0ubuntu2","0.2.2-0ubuntu2.1"]}],"products":[{"vendor":"uutils","product":"coreutils"}],"references":[{"url":"https://github.com/uutils/coreutils/pull/9793","tags":["patch","issue-tracking","Issue Tracking","Patch","fix","web","report"]},{"url":"https://github.com/uutils/coreutils/releases/tag/0.6.0","tags":["vendor-advisory","Release Notes","advisory","web"]},{"url":"https://github.com/uutils/coreutils/security/advisories/GHSA-4x34-chg5-mwjj","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35339","tags":["advisory"]},{"url":"https://github.com/uutils/coreutils/commit/abd581f62e97d0b147306ac40eac13af71c6fbba","tags":["web"]},{"url":"https://github.com/advisories/GHSA-4x34-chg5-mwjj"},{"url":"https://github.com/advisories/GHSA-vp6q-mv9j-j428"},{"url":"https://github.com/uutils","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/35xxx/CVE-2026-35339.json","tags":["advisory"]},{"url":"https://github.com/uutils/coreutils","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-35339","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-35339","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-35339","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-35339","title":"uutils coreutils chmod False Success Exit Code in Recursive Mode","description":"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.","status":"published","published":"2026-04-22T16:07:33.703Z","modified":"2026-04-22T18:13:40.854Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-253"],"updated_at":"2026-11-02T14:20:05.505362Z"}],"euvd":[{"id":"EUVD-2026-24965","description":"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.","status":"published","published":"2026-04-22T16:07:33Z","modified":"2026-04-22T18:13:40Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T19:24:19.81608Z"}],"ghsa":[{"id":"GHSA-4x34-chg5-mwjj","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 -\u003e ret=1\n$ uutils chmod -R 0755 chmod-bug/root chmod-bug/user  # -\u003e 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._","status":"published","published":"2026-07-06T19:27:41Z","modified":"2026-07-06T19:27:42Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-252","CWE-253","CWE-755"],"updated_at":"2026-11-02T14:40:39.314643Z"},{"id":"GHSA-vp6q-mv9j-j428","title":"Duplicate Advisory: uutils coreutils incorrectly handles exit codes when processing multiple files","description":"### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-4x34-chg5-mwjj. This link is maintained to preserve external references.\n\n### Original Description\nThe 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.","status":"withdrawn","published":"2026-04-22T18:31:44Z","modified":"2026-07-06T19:27:30Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-253"],"updated_at":"2026-11-02T14:40:39.314643Z"}],"nvd":[{"id":"CVE-2026-35339","description":"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.","status":"published","published":"2026-04-22T17:16:35.767Z","modified":"2026-10-26T21:10:00.17Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-253"],"updated_at":"2026-11-02T14:12:15.493943Z"}],"osv":[{"id":"CVE-2026-35339","title":"uutils coreutils chmod False Success Exit Code in Recursive Mode","description":"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.","status":"published","published":"2026-04-22T16:07:33.703Z","modified":"2026-10-28T02:30:45.325392869Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-253"],"updated_at":"2026-11-02T15:45:02.673625Z"},{"id":"DEBIAN-CVE-2026-35339","description":"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.","status":"published","published":"2026-04-22T17:16:35.767Z","modified":"2026-10-27T09:47:43.748268468Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:54.587575Z"},{"id":"GHSA-4x34-chg5-mwjj","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 -\u003e ret=1\n$ uutils chmod -R 0755 chmod-bug/root chmod-bug/user  # -\u003e 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._","status":"published","published":"2026-07-06T19:27:41Z","modified":"2026-07-06T19:41:24.785517Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-252","CWE-253","CWE-755"],"updated_at":"2026-11-02T15:46:37.528068Z"},{"id":"GHSA-vp6q-mv9j-j428","title":"Duplicate Advisory: uutils coreutils incorrectly handles exit codes when processing multiple files","description":"### Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-4x34-chg5-mwjj. This link is maintained to preserve external references.\n\n### Original Description\nThe 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.","status":"withdrawn","published":"2026-04-22T18:31:44Z","modified":"2026-09-10T03:51:03.364510136Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-253"],"updated_at":"2026-11-02T15:46:57.348035Z"},{"id":"UBUNTU-CVE-2026-35339","description":"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.","status":"published","published":"2026-04-22T17:16:00Z","modified":"2026-05-14T14:40:07.688251Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T16:56:16.686388Z"}]}}
