CVE-2026-35350

uutils coreutils cp Unexpected Privileged Executable Creation with -p

Published Apr 22, 2026 CVSS 3.1 · 6.6 Medium EPSS < 1% KEV · Not listed
Description
The cp utility in uutils coreutils fails to properly handle setuid and setgid bits when ownership preservation fails. When copying with the -p (preserve) flag, the utility applies the source mode bits even if the chown operation is unsuccessful. This can result in a user-owned copy retaining original privileged bits, creating unexpected privileged executables that violate local security policies. This differs from GNU cp, which clears these bits when ownership cannot be preserved.

Analysis

AI-generated

Technical impact

The cp utility in uutils coreutils does not correctly handle setuid and setgid bits when ownership preservation fails. When a user runs cp with the preserve flag (-p) and the underlying chown operation cannot change the file owner, the utility still applies the original mode bits to the target file. This results in the resulting file inheriting privileged bits, effectively creating a privileged executable owned by the user. The vulnerability allows local attackers to fabricate executables that run with elevated privileges, violating local security policies. The weakness is identified as CWE-281. Based on the description, the likely attack scenario involves a user copying a setuid setgid file to a location where they have write permissions, relying on the preserve flag, and thereby gaining the ability to execute code as a higher-privileged user.

Affected Systems

The affected product is the uutils coreutils package. No specific version information is provided in the CVE data, so any installation of the current uutils coreutils release that contains the described implementation flaw is potentially vulnerable.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.6, signifying moderate severity. The EPSS score of < 1% suggests a very low probability of exploitation, and the issue is not listed in the CISA KEV catalog. An attacker would need local access: the ability to read a source file that has setuid or setgid bits and the capability to write to a target directory where the copy will be placed. If the chown operation fails because the attacker does not have root permissions, the preserved setuid/setgid bits remain on the created file, giving the user the ability to execute code with elevated privileges. In typical desktop or server environments where unprivileged users have write access to directories that may receive copies of setuid files, the exploit conditions are achievable.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade uutils coreutils to a version that fixes the setuid handling bug.
  • Avoid using the -p flag when copying files with setuid or setgid bits; instead, copy normally and then strip privileged bits with chmod u-s.
  • Configure the system or deployment to automatically clear setuid/setgid bits on files placed in user writable locations, e.g., by using a file-system hook or by enforcing a mount option that removes these bits.

Generated by OpenCVE AI on April 28, 2026 at 08:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x2wv-9p67-mh9w uutils coreutils doesn't properly handle setuid and setgid bits when ownership preservation fails
Ubuntu USN Ubuntu USN USN-9041-1 uutils coreutils vulnerabilities
History
Type Values Removed Values Added
First Time appeared Uutils
Uutils coreutils
CPEs cpe:2.3:a:uutils:coreutils:-:*:*:*:*:rust:*:*
Vendors & Products Uutils
Uutils coreutils
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The cp utility in uutils coreutils fails to properly handle setuid and setgid bits when ownership preservation fails. When copying with the -p (preserve) flag, the utility applies the source mode bits even if the chown operation is unsuccessful. This can result in a user-owned copy retaining original privileged bits, creating unexpected privileged executables that violate local security policies. This differs from GNU cp, which clears these bits when ownership cannot be preserved.
Title uutils coreutils cp Unexpected Privileged Executable Creation with -p
Weaknesses CWE-281
References
Metrics cvssV3_1

{'score': 6.6, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L'}

Weaknesses
  • CWE-281

    Improper Preservation of Permissions

Sources

Status
PUBLISHED
Assigner
canonical
Published
Updated
Apr 22, 2026, 5:58 PM
Reserved
Apr 2, 2026, 12:58 PM
Status
Analyzed
Published
Apr 22, 2026, 5:16 PM
Modified
Oct 26, 2026, 9:10 PM