CVE-2022-24986
High · 7.8CVSS
7.8
EPSS
0.3%
Published
Feb 26, 2022
CISA due date
—
Cloudanix analysis
A scheduling tool on Linux desktops can be tricked by another user on the same computer into running the attacker's commands instead of the intended ones.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Insecure reuse of a predictable temporary filename in /tmp during KCron editing sessions creates a time-of-check-to-time-of-use race condition that allows an attacker to replace the file contents between creation and execution.
Why it matters to the business
Local users can gain the ability to execute arbitrary commands with the privileges of the KCron process owner, potentially leading to full system compromise on multi-user Linux desktops or servers that rely on this cron editor.
How an attack unfolds
An attacker with local access monitors /tmp for the initial creation of the KCron temporary file, records its name, then prepares a symlink or malicious replacement file with the same name; on the next save operation within the same editing session the malicious file is consumed and its commands are scheduled.
How to fix it
Upgrade KDE KCron to a version that uses secure temporary file handling such as mkstemp or a private directory; if no updated package is available, replace KCron with an alternative cron editor that avoids predictable /tmp filenames.
How to confirm the fix worked
Inspect the KCron source or running process to confirm temporary files are created with mkstemp or O_EXCL flags and are placed outside world-writable directories; test by attempting concurrent file creation with the same name.
Typical attack path
- Obtain local user access on the target system
- Monitor /tmp directory for KCron temporary file creation events
- Capture the exact filename used in the first save
- Create a symlink or malicious file using the captured name before the next edit
- Trigger or wait for the user to perform a subsequent save in KCron
- Verify the attacker-controlled commands have been added to the crontab
How to detect it
Search system logs and file creation events in /tmp for repeated or predictable filenames matching KCron session patterns; examine crontab entries added during active editing sessions for unexpected commands.
What your security team should do
- Remove or restrict local interactive access for untrusted users on systems running KCron
- Audit all systems for presence of KDE KCron and schedule replacement with a maintained cron editor
- Enable filesystem monitoring on /tmp to alert on unexpected file creation by cron-related processes
- Review existing crontabs for any unauthorized entries that may indicate prior exploitation
The record
KDE KCron through 21.12.2 uses a temporary file in /tmp when saving, but reuses the filename during an editing session. Thus, someone watching it be created the first time could potentially intercept the file the following time, enabling that person to run unauthorized commands.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | kcron | 0 | No fix |
| Debian:12 | kcron | 0 | 4:21.12.3-1 |
| Debian:13 | kcron | 0 | 4:21.12.3-1 |
| Ubuntu:16.04:LTS | kcron | 0 | No fix |
| Ubuntu:18.04:LTS | kcron | 0 | No fix |
| Ubuntu:20.04:LTS | kcron | 0 | No fix |
| Ubuntu:22.04:LTS | kcron | 0 | No fix |
| Ubuntu:24.04:LTS | kcron | 0 | No fix |
| Ubuntu:24.10 | kcron | 0 | No fix |
| Ubuntu:25.04 | kcron | 0 | No fix |
| Ubuntu:25.10 | kcron | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | kcron | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | kcron | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | kcron | 0 | No fix |
Related vulnerabilities
- CVE-2026-61854 VoiceSentinel is a real-time voice moderation system for Minecraft servers. CWE-362
- CVE-2026-118030 A flaw was found in the HOTP authentication mechanism of the keycloak-services component… CWE-362
- CVE-2026-115402 OpenVPN ovpn-dco-win 0.6.5 through 2.8.13 allows unprivileged local users to cause a… CWE-362
- CVE-2026-118128 A vulnerability has been found in a2aproject a2a-js up to 1.1.0. CWE-362
- CVE-2026-117507 A security vulnerability has been detected in a2aproject a2a-java up to 1.2.0.Final. CWE-362
- CVE-2026-117499 @fastify/session is a session plugin for Fastify. CWE-362
- CVE-2026-112708 A race condition was addressed with improved locking. CWE-362
- CVE-2026-113896 A race condition was addressed with additional validation. CWE-362