# CVE-2026-41651: PackageKit vulnerable to TOCTOU Race on Transaction Flags leads to arbitrary package installation as root

> Local unprivileged users can exploit a race condition in PackageKit to install arbitrary packages as root, leading to privilege escalation.

- **Severity:** High 8.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2026
- **Updated:** 15 Jul 2026
- **Also known as:** ALSA-2026:11504, ALSA-2026:11635, ALSA-2026:19141, ALSA-2026:19354, CLSA-2026-1778773906, CLSA-2026-1779711412, DEBIAN-CVE-2026-41651, GHSA-f55j-vvr9-69xv, MGASA-2026-0180, OESA-2026-2140, RHSA-2026:11504, RHSA-2026:11635, RHSA-2026:17558, RHSA-2026:17560, RHSA-2026:17561, RHSA-2026:18024, RHSA-2026:18031, RHSA-2026:18036, RHSA-2026:19141, RHSA-2026:19354, RHSA-2026:19454, RHSA-2026:19601, RHSA-2026:22146, RLSA-2026:11504, RLSA-2026:11635, RLSA-2026:19141, RLSA-2026:19354, ROOT-OS-UBUNTU-2004-CVE-2026-41651, SUSE-SU-2026:1619-2, SUSE-SU-2026:1700-1, SUSE-SU-2026:1701-1, SUSE-SU-2026:1939-1, SUSE-SU-2026:21427-1, UBUNTU-CVE-2026-41651, USN-8195-1, USN-8195-3, openSUSE-SU-2026:10629-1, openSUSE-SU-2026:20646-1

## What is CVE-2026-41651?

CVE-2026-41651 is a high-severity vulnerability in PackageKit, published on 22 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### 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.

Weakness: CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition)

## Which versions are affected by CVE-2026-41651?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `PackageKit` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit-command-not-found` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit-glib` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit-glib-devel` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit-gstreamer-plugin` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit-gtk3-module` | AlmaLinux:10 | All versions | 1.2.8-8.el10_2 |
| `PackageKit` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-command-not-found` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-cron` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-glib` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-glib-devel` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-gstreamer-plugin` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit-gtk3-module` | AlmaLinux:8 | All versions | 1.1.12-8.el8_10 |
| `PackageKit` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit-command-not-found` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit-command-not-found` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit-glib` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit-glib` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit-glib-devel` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit-glib-devel` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit-gstreamer-plugin` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit-gstreamer-plugin` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit-gtk3-module` | AlmaLinux:9 | All versions | 1.2.6-2.el9_7 |
| `PackageKit-gtk3-module` | AlmaLinux:9 | All versions | 1.2.6-2.el9_8 |
| `PackageKit` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-command-not-found` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-command-not-found-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-glib` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-glib-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-glib-devel` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-gstreamer-plugin` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-gstreamer-plugin-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-gtk3-module` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit-gtk3-module-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:1.2.8-8.el10_2 |
| `PackageKit` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.1.12-8.el8_10 |
| `PackageKit-command-not-found` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.1.12-8.el8_10 |
| `PackageKit-command-not-found-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.1.12-8.el8_10 |

Products: Packagekit Project Packagekit.

## How do I fix CVE-2026-41651?

Upgrade to a fixed version.

## Is CVE-2026-41651 being exploited?

There is no known exploitation of CVE-2026-41651 in the wild and no public exploit code.

Public exploit code:

- https://github.com/Vozec/CVE-2026-41651 (github_poc): https://github.com/Vozec/CVE-2026-41651
- 🛡️ Official AI Security Tool module for CVE-2026-41651 (PackageKit TOCTOU Local Privilege Escalation / Pack2TheRoot Deep Dive Analysis & Audit Module). (github_poc): https://github.com/ZeroDayEvil/CVE-2026-41651
- CVE-2026-41651 — PackageKit TOCTOU LPE (github_poc): https://github.com/baph00met/CVE-2026-41651
- CVE-2026-41651 (github_poc): https://github.com/0xredash/CVE-2026-41651
- Poc for Pack2TheRoot CVE-2026-41651 (github_poc): https://github.com/shibaaa204/Pack2TheRoot
- https://github.com/CipherCloak/CVE-2026-41651 (github_poc): https://github.com/CipherCloak/CVE-2026-41651

## Other vulnerabilities in PackageKit

- [CVE-2022-0987](https://insights.sbomify.com/CVE-2022-0987/): Information disclosure in PackageKit (low 3.3)
- [CVE-2013-1764](https://insights.sbomify.com/CVE-2013-1764/): Privilege escalation in n/a (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41651 and fix it if it is affected.

What it is: CVE-2026-41651 is a high-severity vulnerability in PackageKit, published on 22 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41651 in the wild and no public exploit code.

Affected product: PackageKit. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41651/ (Markdown: https://insights.sbomify.com/CVE-2026-41651/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41651
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41651
- OSV: https://osv.dev/vulnerability/CVE-2026-41651

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41651/
Summaries are generated and may contain mistakes; the official description above is the record.
