---
id: "CVE-2026-91151"
page: "https://infrastack.ai/live/CVE-2026-91151"
kind: "vulnerability"
aliases: ["CVE-2026-91151"]
title: "Cockpit: local user can change file ownership and gain root"
severity: "high"
cvss: 7.3
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: [{"name": "cockpit", "fixed": ["372"], "affected": "< 372 (lower bound unknown)", "ecosystem": "vendor"}]
ecosystems: []
tags: ["cockpit", "infrastructure", "linux", "local-privilege-escalation", "self-hosted"]
not_affected_if: ["cockpit-not-installed", "no-cockpit-installed", "no-local-untrusted-users"]
published_at: "2026-11-11T20:17:10+00:00"
first_seen_at: "2026-11-11T20:28:53+00:00"
updated_at: "2026-11-11T20:31:24+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-91151", "first_seen_at": "2026-11-11T20:28:53+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-11T20:31:24+00:00"}]
exploit_sources: []
---

# Cockpit: local user can change file ownership and gain root

Link for people: https://infrastack.ai/live/CVE-2026-91151 (this .md is for agents)

A flaw in the ssh-add-public-key.sh helper of Cockpit lets a local, logged-in user trick the privileged helper into following attacker-controlled symlinks in a target account's .ssh directory or authorized_keys file. An attacker can use this to change file ownership and modes, which can lead to local privilege escalation.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:cockpit affected < 372 (lower bound unknown) fixed 372

## How to check

Run 'cockpit-bridge --version' or your package manager query (rpm -q cockpit-system / dpkg -l cockpit-system); versions below 372 lack the fix. Lower affected bound is not stated by the sources. Only matters if the cockpit users page is installed (pkg/users/ssh-add-public-key.sh).

## Fix

Upgrade Cockpit to 372 or later (or your distro's backport of commit 4796b28).

## Timeline

- 2026-11-11T20:28:53+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-91151
- 2026-11-11T20:31:24+00:00 analyst — Cockpit 372 release notes list CVE-2026-91151; commit 4796b28 makes ssh-add-public-key.sh run as the user and stops it changing ownership through symlinks. Affected lower bound and exploitation not stated in sources; NVD page returned nothing.

## Documents

- [fix] Patch: github.com https://github.com/cockpit-project/cockpit/commit/4796b28be064a90e32262cec85be7839e6198e23
- [fix] Release notes: github.com https://github.com/cockpit-project/cockpit/releases/tag/372

## From the sources

A flaw was found in Cockpit. A local authenticated user with control over a target account's home directory can exploit a privileged symlink dereference vulnerability in the `ssh-add-public-key.sh` helper. When this helper runs with elevated privileges, it can be tricked into following attacker-controlled symlinks within the `.ssh` or `authorized_keys` paths. This allows the attacker to arbitrarily change file ownership and modes, potentially leading to local privilege escalation and impacting the integrity, confidentiality, and availability of the system.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
