CVE-2026-91203: Cockpit-files: cockpit-files: arbitrary file ownership and permission modification via symlink race condition

Published May 4, 2026
·
Updated

A flaw was found in cockpit-files. This vulnerability allows a local attacker to exploit a timing issue, known as a symlink race condition, during privileged file operations such as changing file ownership or permissions. By manipulating directory entries and winning this race, the attacker can redirect these operations to unintended files. This could lead to unauthorized changes in file ownership and permissions on arbitrary files, potentially compromising system integrity and availability by altering system or application states or rendering services unusable.

Other sources

AIONLYREPORT package: cockpit-files-36-1.el10 ------ Summary: Symlink Race in chown/chmod Operations: privileged pathname-based ownership and permission changes can be redirected through a symlink swap in attacker-writable directories Requirements to exploit: A local attacker must be able to modify entries in the directory being operated on, a Cockpit Files session must perform one of the affected operations with superuser: "require" or with superuser: "try" successfully elevated, and the attacker must win a timing race that replaces the intended pathname with a symlink before the privileged chown or chmod runs. Component affected: cockpit-files-36-1.el10, privileged file metadata operations in src/dialogs/create-file.tsx, src/dialogs/mkdir.tsx, src/upload-button.tsx, src/dialogs/copyPasteOwnership.tsx, and src/dialogs/permissions.tsx Version affected: cockpit-files-36-1.el10 Patch available: no released package fix established; proposed patch included below Version fixed: unknown Upstream coordination: Not notified. CVSS: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:H/A:H - 6.4 (MEDIUM) AV:L - Exploitation requires local access to a writable directory processed by the application. AC:H - The attacker must win a symlink race against a privileged filesystem operation. PR:L - The attacker needs the ability to create or replace entries in the target directory. UI:R - A privileged user must trigger the affected file creation, upload, ownership, or permission change flow. S:U - The impact remains within the same system security scope. C:N - The observed effect is unauthorized metadata change rather than direct information disclosure. I:H - Ownership or mode changes on an unintended target can materially alter system or application state. A:H - Incorrect privileged metadata changes can render files or services unusable. Impact: Moderate. The flaw can affect integrity and availability in a meaningful way, but exploitation is not straightforward: it is local-only, depends on a privileged user operating on an attacker-writable path, and requires winning a race. Under Red Hat's severity guidance, this is better classified as Moderate than Important because the security impact is real but workflow- and configuration-dependent and less easily exploitable. Embargo: no Reason: The issue appears to be a local race condition with non-trivial prerequisites and practical mitigations, so it does not appear to warrant embargo handling. Acknowledgement: Aisle Research Vulnerability Details: Several code paths perform privileged chown or chmod operations on pathnames after separate create, selection, copy, or upload steps. When the acted-on directory is attacker-writable, that pathname can be replaced with a symlink before the privileged metadata change executes. In that case, the operation can be redirected to an unintended target. The following exact call sites illustrate the pattern: tsx // src/dialogs/create-file.tsx:45 await cockpit.spawn(["chown", owner, filename], { superuser: "require" }); // src/dialogs/mkdir.tsx:45 await cockpit.spawn(["chown", owner, path], opts); // src/upload-button.tsx:268 await cockpit.spawn(["chown", owner, destination], { superuser: "try" }); // src/dialogs/copyPasteOwnership.tsx:44-49 await cockpit.spawn([ "chown", "--recursive", ownerStr, ...clipboard.files.map(file => dstPath + "/" + file.name), ], { superuser: "require" }); // src/dialogs/permissions.tsx:170-174 await cockpit.spawn(["chmod", "-R", modetoargs(mode), fullpath], { superuser: "try", err: "message" }); await cockpit.spawn(["chown", "-R", owner + ":" + group, fullpath], { superuser: "try", err: "message" }); // src/dialogs/permissions.tsx:191-192 await cockpit.spawn(["chmod", mode.toString(8), ...filepaths], { superuser: "try", err: "message" }); For chown, the absence of --no-dereference means a symlink operand is resolved to its target. For chmod, operating on a symlink pathname likewise affects the referenced file rather than the link itself. Because these operations are issued against mutable pathnames rather than stable descriptors, an attacker who controls the directory namespace can attempt a symlink swap between the earlier UI action and the later privileged metadata change. The practical impact depends on runtime conditions. If the affected flow is used only in directories not writable by untrusted users, or if privileged escalation is unavailable, exploitability is substantially reduced. Where a privileged user does operate on attacker-writable directories, the bug can result in unintended ownership or permission changes on arbitrary files reachable through the symlink target. Steps to reproduce: 1. Use a Cockpit session where privileged filesystem operations are available, so that superuser: "require" or superuser: "try" results in an elevated chown or chmod. 2. Choose a directory writable by a low-privileged attacker and accessible through the Files UI. 3. Select one affected flow, for example creating a file with an owner, creating a directory with an owner, uploading with owner adjustment, or applying recursive ownership or permission changes. 4. In parallel, continuously replace the intended pathname in that writable directory with a symlink to a chosen target file. 5. Trigger the UI action as the privileged user. 6. Observe that the target file's ownership or mode changes, rather than only the originally intended filesystem object. Mitigation: Until a fix is available, avoid using privileged ownership or permission changes in directories writable by untrusted users. Where possible, restrict or disable superuser-backed file operations for shared writable paths. Operationally, prefer workflows that perform metadata changes only on trusted directories. Proposed Fix: Add --no-dereference and -- to the affected chown and chmod invocations so that symlink operands are not followed on these path-based operations. A minimal patch is below. diff diff --git a/src/dialogs/create-file.tsx b/src/dialogs/create-file.tsx @@ await cockpit.spawn(["chown", owner, filename], { superuser: "require" }); + await cockpit.spawn(["chown", "-no-dereference", owner, "-", filename], { superuser: "require" });

diff --git a/src/dialogs/mkdir.tsx b/src/dialogs/mkdir.tsx @@ await cockpit.spawn(["chown", owner, path], opts); + await cockpit.spawn(["chown", "-no-dereference", owner, "-", path], opts);

diff --git a/src/upload-button.tsx b/src/upload-button.tsx @@ await cockpit.spawn(["chown", owner, destination], { superuser: "try" }); + await cockpit.spawn(["chown", "--no-dereference", owner, "--", destination], { superuser: "try" });

diff --git a/src/dialogs/copyPasteOwnership.tsx b/src/dialogs/copyPasteOwnership.tsx @@ "chown", "--recursive", ownerStr, ...clipboard.files.map(file => dstPath + "/" + file.name), + "chown", "--no-dereference", "--recursive", ownerStr, "--", ...clipboard.files.map(file => dstPath + "/" + file.name),

diff --git a/src/dialogs/permissions.tsx b/src/dialogs/permissions.tsx @@ await cockpit.spawn(["chmod", "-R", modetoargs(mode), fullpath], { superuser: "try", err: "message" });

await cockpit.spawn(["chown", "-R", owner + ":" + group, fullpath], { superuser: "try", err: "message" }); + await cockpit.spawn(["chmod", "--no-dereference", "-R", modetoargs(mode), "--", fullpath], { superuser: "try", err: "message" }); + await cockpit.spawn(["chown", "--no-dereference", "-R", owner + ":" + group, "--", fullpath], { superuser: "try", err: "message" });

@@ await cockpit.spawn(["chmod", mode.toString(8), ...filepaths], { superuser: "try", err: "message" }); + await cockpit.spawn(["chmod", "--no-dereference", mode.toString(8), "--", ...filepaths], { superuser: "try", err: "message" });

------ This report was generated using AI technology. Always review AI-generated content prior to use

— Red Hat

Affected Software

2 affected componentsFixes available
cockpit-files=36-1.el10
debian/cockpit-files<45-1
45-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/cockpit-files to a version that resolves this vulnerability.

    Fixed in 45-1
  2. Configuration

    Update the affected code paths so privileged ownership/permission changes do not follow symlinks: for `chown` add `--no-dereference` and ensure the command includes `--` before the (possibly attacker-influenced) pathname; for `chmod` ensure symlink pathname operands are not followed by using `chmod` with `--no-dereference` (and where applicable `-R` plus explicit `--` before path list). Apply this change in the call sites shown: `src/dialogs/permissions.tsx`, `src/upload-button.tsx`, `src/dialogs/copyPasteOwnership.tsx`, `src/dialogs/create-file.tsx`, and `src/dialogs/mkdir.tsx`.

    cockpit-files-36-1.el10 (Cockpit Files privileged chown/chmod flows) chown/chmod invocation arguments = Use --no-dereference and include -- before path operands
  3. Compensating control

    Until the cockpit-files fix is available, avoid running privileged ownership/permission changes on directories that are writable by untrusted/low-privileged attackers; ensure the privileged user operates only on trusted directories (i.e., prevent symlink-swap/race conditions in attacker-writable pathnames).

Event History

May 4, 2026
Data Sourced
via Red Hat·03:54 PM
DescriptionSeverityAffected Software
Sep 18, 2026
CVE Published
via MITRE·07:21 PM
Data Sourced
via MITRE·07:21 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:17 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·08:17 PM
DescriptionSeverityAffected Software
Sep 21, 2026
Exploit Published
via CISA·06:33 PM

Frequently Asked Questions

1

Who is exposed to this issue?

Systems are exposed when a local attacker can modify directory entries in a directory being operated on through Cockpit Files, and a privileged Cockpit Files ownership or permission change is performed on a pathname in that directory.

2

What must an attacker do to exploit the flaw?

The attacker must replace the intended pathname with a symlink at the right moment before the privileged chown or chmod operation runs. They also need a Cockpit Files session performing the operation with superuser access required or successfully elevated.

3

Are unprivileged Cockpit Files operations affected?

The described attack requires an affected operation to run with elevated privileges. The relevant session must use superuser: "require" or use superuser: "try" and successfully elevate.

4

What could indicate that exploitation has occurred?

Unexpected ownership or permission changes on files, particularly files outside the intended target path, may indicate exploitation. The impact can include altered system or application state and services becoming unusable due to changed file permissions or ownership.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203