Cloudanix VulnDB

CVE-2024-36041

High · 7.8

CVSS

7.8

EPSS

0.3%

Published

Jul 5, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the KDE desktop software lets any other person logged into the same computer hijack a user's session and run their own programs the next time that user logs in.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Authentication Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

KSmserver accepts all local ICE connections without authentication, allowing any local user to connect to the session manager and abuse session-restore functionality to inject code that executes as another user on subsequent login via /tmp artifacts.

Why it matters to the business

On multi-user systems running affected KDE Plasma versions, a malicious local account can achieve arbitrary code execution under another user's context on the next boot, increasing risk of lateral movement or persistence in shared environments.

How an attack unfolds

An attacker with a local account on the same host connects to KSmserver via unauthenticated ICE, manipulates the session manager state, plants malicious session-restore data in /tmp, and waits for the victim to log in again so the code runs with the victim's privileges.

How to fix it

Upgrade plasma-workspace to version 5.27.11.1 or later for the 5.27 series, and to 6.0.5.1 or later for the 6.x series. Restrict multi-user access on shared systems until patches are applied and consider disabling session restore if immediate upgrade is not feasible.

How to confirm the fix worked

Verify the installed plasma-workspace package version is at least 5.27.11.1 or 6.0.5.1, confirm ICE connection handling now requires additional authentication tokens, and test that session-restore no longer processes files from other users' /tmp entries.

Typical attack path

  1. Obtain a local shell as a non-privileged user on the target host
  2. Connect to KSmserver using the host-only ICE authentication path
  3. Modify or inject session-restore entries via the session manager interface
  4. Place executable payloads in /tmp that will be loaded on the victim's next login
  5. Trigger a logout/login cycle for the victim user to achieve code execution

How to detect it

Review system and session manager logs for unexpected ICE connections from non-owner UIDs, inspect /tmp for session-restore artifacts with suspicious ownership or content, and correlate login events with subsequent process spawns from other users' contexts.

What your security team should do

  • Prioritize patching plasma-workspace on all multi-user or shared workstations within the next patch cycle
  • Audit systems for concurrent local user logins and limit unnecessary multi-user access
  • Monitor for upcoming updates and test in staging before broad deployment
  • Document the upgrade versions and re-validate session manager behavior post-install

The record

KSmserver in KDE Plasma Workspace (aka plasma-workspace) before 5.27.11.1 and 6.x before 6.0.5.1 allows connections via ICE based purely on the host, i.e., all local connections are accepted. This allows another user on the same machine to gain access to the session manager, e.g., use the session-restore feature to execute arbitrary code as the victim (on the next boot) via earlier use of the /tmp directory.

Affected packages

Ecosystem Package Introduced Fixed
Debian:10 plasma-workspace 0 4:5.14.5.1-1+deb10u1
Debian:11 plasma-workspace 0 4:5.20.5-6+deb11u1
Debian:12 plasma-workspace 0 4:5.27.5-2+deb12u2
Debian:13 plasma-workspace 0 4:5.27.11.1-1
Debian:14 plasma-workspace 0 4:5.27.11.1-1
Mageia:9 plasma-workspace 0 5.27.10-1.1.mga9
SUSE:Package Hub 15 SP6 plasma5-workspace 0 5.27.11-bp156.3.3.1
Ubuntu:16.04:LTS plasma-workspace 0 No fix
Ubuntu:18.04:LTS plasma-workspace 0 No fix
Ubuntu:20.04:LTS plasma-workspace 0 4:5.18.8-0ubuntu0.2
Ubuntu:22.04:LTS plasma-workspace 0 4:5.24.7-0ubuntu0.2
Ubuntu:23.10 plasma-workspace 0 4:5.27.8-0ubuntu1.1
Ubuntu:24.04:LTS plasma-workspace 0 4:5.27.11-0ubuntu4.1
Ubuntu:24.10 plasma-workspace 0 4:5.27.11.1-0ubuntu1
Ubuntu:Pro:16.04:LTS plasma-workspace 0 No fix
Ubuntu:Pro:18.04:LTS plasma-workspace 0 No fix
openSUSE:Leap 15.6 plasma5-workspace 0 5.27.11-bp156.3.3.1