CVE-2026-41651
High · 8.8CVSS
8.8
EPSS
0.5%
Published
Apr 22, 2026
CISA due date
—
Cloudanix analysis
A local user on an affected Linux system may be able to trick the software updater into installing their own package with full administrator privileges.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Application
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
PackageKit 1.0.2 through 1.3.4 contains a local time-of-check/time-of-use race in transaction flag handling. An unprivileged local user can start an authorized PackageKit transaction, then issue a second InstallFiles() call that overwrites transaction->cached_transaction_flags while the transaction is already running. Because invalid backward state transitions are silently rejected but the overwritten flags remain in place, the backend later reads attacker-controlled flags at execution time. On RPM-based systems, this can allow installation of arbitrary local RPM files as root, including execution of RPM scriptlets with root privileges, resulting in local privilege escalation and potential full host compromise.
Why it matters to the business
An attacker who already has a low-privileged local account or code execution on an affected Linux system can potentially become root without user interaction. This can turn a limited foothold into full control of servers or workstations, allowing data theft, service disruption, persistence, tampering with security tooling, and lateral movement. The issue is not currently listed in CISA KEV, is not known to be ransomware-used, and has a low EPSS score, but it has been public for 112 days and affects a core package-management component that may be widely installed on desktop and server distributions.
How an attack unfolds
Exploitation begins with local access as an unprivileged user. The attacker creates or obtains a malicious RPM package containing payloads in RPM scriptlets such as %pre, %post, %preun, or %postun. They interact with PackageKit over D-Bus and initiate an InstallFiles() transaction using flags that pass the initial authorization and state checks. While the transaction is in progress but before the backend dispatches execution, they race a second InstallFiles() call against the same transaction and overwrite cached_transaction_flags. PackageKit rejects the illegal state rollback but keeps the corrupted flags. When the idle scheduler later dispatches the transaction, it reads the overwritten flags and passes them to the RPM backend. The backend installs the attacker-supplied RPM as root and executes its scriptlets as root, allowing the attacker to create a privileged account, install a setuid binary, modify sudoers, deploy persistence, or run arbitrary root commands.
How to fix it
Upgrade PackageKit to version 1.3.5 or a vendor-supplied package that explicitly backports the fix for this issue. Because distribution package versions may retain older upstream version numbers while carrying patches, verify the vendor changelog or security advisory rather than relying only on the displayed version. Where PackageKit is not required, especially on servers, remove or disable the PackageKit daemon. As interim mitigation, restrict local unprivileged access to PackageKit D-Bus methods through policy controls, harden polkit rules so package installation always requires appropriate administrative authentication, and monitor or block installation of local RPMs from user-writable directories such as /tmp, /var/tmp, /dev/shm, and home directories. These mitigations reduce exposure but should not replace applying the fixed package.
How to confirm the fix worked
Confirm installed PackageKit packages are fixed by checking the package manager inventory, for example with rpm -q PackageKit packagekit or the distribution equivalent, and verify the installed build includes the 1.3.5 fix or a vendor backport. Confirm the running packagekitd binary was restarted after update by checking service start time against package installation time. Validate that unprivileged users cannot install arbitrary local RPM files through PackageKit without proper authorization. Review polkit policy for PackageKit actions to ensure package installation is not broadly permitted. On systems where PackageKit is unnecessary, confirm the packagekit service/socket is disabled or removed. For fleet validation, scan for PackageKit versions in the affected 1.0.2 through 1.3.4 range unless the distribution advisory confirms a backport.
Typical attack path
- Gain local access to an affected Linux host as an unprivileged user through a shell, compromised application account, or malware foothold.
- Build or download a malicious RPM package containing root-executed scriptlets or files intended for privileged placement.
- Use the PackageKit D-Bus API to create and start an InstallFiles() transaction that reaches an authorized/running state.
- Race a second InstallFiles() request against the same transaction to overwrite cached transaction flags after authorization.
- Allow PackageKit’s scheduler to dispatch the transaction using the corrupted flags.
- Have the RPM backend install the attacker-controlled package and execute RPM scriptlets as root.
- Use root privileges to establish persistence, disable controls, access sensitive data, or move laterally.
How to detect it
To determine whether exploitation already occurred, focus on evidence of local RPM installation through PackageKit by non-administrative users. Review systemd journal logs for packagekitd activity, D-Bus activation of org.freedesktop.PackageKit, and polkit decisions around package installation. Correlate PackageKit transactions with RPM database changes, /var/log/dnf.log, /var/log/yum.log, /var/log/messages, /var/log/secure, and auditd execve records. Suspicious patterns include packagekitd installing RPMs from user-writable locations, packagekitd spawning rpm followed by /bin/sh or another interpreter, RPM scriptlets launching network tools or writing privileged files, and package installs with no corresponding sudo, dnf, yum, rpm, or administrator session. If D-Bus auditing or EDR telemetry is available, search for repeated InstallFiles() calls against PackageKit in short time windows by the same unprivileged user, which may indicate racing behavior. For forensic review, inspect recently installed RPMs with rpm -qa --last, validate unknown package contents with rpm -ql and rpm -q --scripts, and examine newly created setuid files, sudoers entries, systemd units, cron jobs, SSH authorized_keys files, and modified PAM or shell profile files around the suspected installation time.
- org.freedesktop.PackageKit
- org.freedesktop.PackageKit.Modify
- InstallFiles
- packagekitd
- /usr/libexec/packagekitd
- /usr/lib/packagekit/packagekitd
- /var/lib/PackageKit/transactions.db
- /var/cache/PackageKit/
- /var/log/dnf.log
- /var/log/yum.log
- /tmp/*.rpm
- /var/tmp/*.rpm
- /dev/shm/*.rpm
- /home/*/*.rpm
- packagekitd.*rpm
- packagekitd.*InstallFiles
- packagekitd.*\/tmp\/.*\.rpm
- packagekitd.*\/var\/tmp\/.*\.rpm
- packagekitd.*\/dev\/shm\/.*\.rpm
- comm="packagekitd"
- exe="/usr/bin/rpm"
- /bin/sh.*RPM
- %pre
- %post
- %preun
- %postun
What your security team should do
- Prioritize patching multi-user Linux systems, developer workstations, VDI hosts, jump boxes, and servers where an application compromise could yield a local shell.
- Upgrade PackageKit to 1.3.5 or the fixed vendor build, then restart packagekitd or reboot to ensure the patched daemon is active.
- Temporarily disable or remove PackageKit on systems where interactive package management is not needed.
- Harden polkit and D-Bus policy so unprivileged users cannot install local packages without administrative approval.
- Hunt for suspicious RPM installs initiated by packagekitd, especially from /tmp, /var/tmp, /dev/shm, or user home directories.
- Investigate any package installations that lack a corresponding administrator action through dnf, yum, rpm, sudo, or a change-management workflow.
- Add audit or EDR detections for packagekitd spawning rpm, shell interpreters, or unusual child processes during package installation.
- Treat confirmed exploitation as root compromise: preserve evidence, rotate local secrets, check persistence mechanisms, and rebuild or reimage where integrity cannot be assured.
The record
PackageKit is a a D-Bus abstraction layer that allows the user to manage packages in a secure way using a cross-distro, cross-architecture API. PackageKit between and including versions 1.0.2 and 1.3.4 is vulnerable to a time-of-check time-of-use (TOCTOU) race condition on transaction flags that allows unprivileged users to install packages as root and thus leads to a local privilege escalation. This is patched in version 1.3.5. A local unprivileged user can install arbitrary RPM packages as root, including executing RPM scriptlets, without authentication. The vulnerability is a TOCTOU race condition on `transaction->cached_transaction_flags` combined with a silent state-machine guard that discards illegal backward transitions while leaving corrupted flags in place. Three bugs exist in `src/pk-transaction.c`: 1. Unconditional flag overwrite (line 4036): `InstallFiles()` writes caller-supplied flags to `transaction->cached_transaction_flags` without checking whether the transaction has already been authorized/started. A second call blindly overwrites the flags even while the transaction is RUNNING. 2. Silent state-transition rejection (lines 873–882): `pk_transaction_set_state()` silently discards backward state transitions (e.g. `RUNNING` → `WAITING_FOR_AUTH`) but the flag overwrite at step 1 already happened. The transaction continues running with corrupted flags. 3. Late flag read at execution time (lines 2273–2277): The scheduler's idle callback reads cached_transaction_flags at dispatch time, not at authorization time. If flags were overwritten between authorization and execution, the backend sees the attacker's flags.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| openSUSE:Tumbleweed | PackageKit | 0 | 1.3.5-1.1 |
Related vulnerabilities
- CVE-2020-16121 PackageKit provided detailed error messages to unprivileged callers that exposed… Also affects PackageKit
- CVE-2026-53613 util-linux is a random collection of Linux utilities. CWE-367
- CVE-2026-53612 util-linux is a random collection of Linux utilities. CWE-367
- CVE-2026-67693 An issue in gnutls v.3.8.13 allows an attacker to obtain sensitive information via… CWE-367
- CVE-2026-106451 yawkat LZ4 Java provides LZ4 compression for Java. CWE-367
- CVE-2026-86805 A time-of-check to time-of-use (TOCTOU) race condition in the dynamic loader (ld.so) of… CWE-367
- CVE-2026-68488 A Time-of-check Time-of-use (TOCTOU) race condition leading to insecure symlink following… CWE-367
- CVE-2026-87554 Race condition in Chromoting in Google Chrome on on Windows prior to 153.0.8010.36… CWE-367