CVE-2026-35339: chmod Recursive Mode Returns Exit Code Vulnerability
MODERATECVE-2026-35339 is a MODERATE (CVSS 5.5) recursive mode returns exit code vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting chmod libraries in the crates.io ecosystem. The issue involves recursive mode returns exit code 0 even when some files fail (last-file-wins). Remediation is available by upgrading affected packages to version 0.6.0.
CVE-2026-35339 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2026-35339
To remediate this vulnerability, upgrade all affected chmod dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade uu_chmod to 0.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for uu_chmod
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-35339, inspect your project dependencies for chmod:
inspect dependencies for uu_chmod
Analyze the terminal output to locate any version of chmod in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In chmod, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-35339 Affected chmod Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
uu_chmod
|
crates.io |
< 0.6.0
|
0.6.0
|
References
Frequently Asked Questions
What is CVE-2026-35339?
Which chmod versions are affected?
What version fixes CVE-2026-35339?
Is uu_chmod affected?
What is the CVSS score of CVE-2026-35339?
What CWE is associated with CVE-2026-35339?
How can I check crates.io dependencies for CVE-2026-35339?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4x34-chg5-mwjj",
"modified" : "2026-07-06T19:27:41Z",
"published" : "2026-07-06T19:27:41Z",
"aliases" : [ "CVE-2026-35339" ],
"summary" : "chmod: recursive mode returns exit code 0 even when some files fail (last-file-wins)",
"details" : "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._",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "uu_chmod"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/uutils/coreutils/security/advisories/GHSA-4x34-chg5-mwjj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35339"
}, {
"type" : "WEB",
"url" : "https://github.com/uutils/coreutils/pull/9793"
}, {
"type" : "WEB",
"url" : "https://github.com/uutils/coreutils/commit/abd581f62e97d0b147306ac40eac13af71c6fbba"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/uutils/coreutils"
}, {
"type" : "WEB",
"url" : "https://github.com/uutils/coreutils/releases/tag/0.6.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-252", "CWE-253", "CWE-755" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-06T19:27:41Z",
"nvd_published_at" : null
}
}