PackageKit: Time-of-check Time-of-use (TOCTOU) Race Condition
CVE-2026-41651 is a high-severity time-of-check time-of-use (TOCTOU) race condition vulnerability in PackageKit, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected PackageKit versions: >= 1.0.2, <= 1.3.4. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.55% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of PackageKit you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Scored by CNA (github.com).
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.8 | High | CNA (github.com) |
| CVSS 3.1 | 8.8 | High | CNA |
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Time-of-check Time-of-use (TOCTOU) Race Condition
The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
How developers prevent this class of flaw
- The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
- When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
- Limit the interleaving of operations on files from multiple processes.
More Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities (CWE-367)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- openwall.com/lists/oss-security/2026/04/22/6Mailing List, Third Party Advisory
Technical write-ups (may include proof of concept)
- github.security.telekom.com/2026/04/pack2theroot-linux-local-privilege-escalation.htmlExploit, Third Party Advisory
Other references
- github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L2273-L22…Product
- github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L4036Product
- github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L873-L882Product
- access.redhat.com/errata/RHSA-2026:11504
- access.redhat.com/errata/RHSA-2026:11635
- access.redhat.com/errata/RHSA-2026:17558
- access.redhat.com/errata/RHSA-2026:17560
- access.redhat.com/errata/RHSA-2026:17561
- access.redhat.com/errata/RHSA-2026:18024
- access.redhat.com/errata/RHSA-2026:18031
- access.redhat.com/errata/RHSA-2026:18036
- access.redhat.com/errata/RHSA-2026:19141
- access.redhat.com/errata/RHSA-2026:19354
- access.redhat.com/errata/RHSA-2026:19454
- access.redhat.com/errata/RHSA-2026:19601
Other vulnerabilities in PackageKit
- 8.5 High severity
Recent Time-of-check Time-of-use (TOCTOU) Race Condition vulnerabilities
- 7.0 High severity
- 8.2 High severity
- 7.1 High severity
- 7.0 High severity
- 7.5 High severity
- 7.8 High severity
Spotted an error? Tell us.