PackageKit
PackageKit vulnerable to TOCTOU Race on Transaction Flags leads to arbitrary package installation as root
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.0.2, <= 1.3.4
Mitigation
The record names no fix. Check the vendor advisory below.
References
- Vendor advisory github.com/PackageKit/PackageKit/security/advi…
Timeline
Days relative to CVE publicationFirst public PoC 1.4 days after publication; not in CISA KEV. First PoC: CipherCloak/CVE-2026-41651 (created 23 Apr 2026, found by us: backfilled).
PoC repositories
Found on GitHub.12 PoCs · 2 pending · 2 informational · 2 suspicious or fake
PoCs 12
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| CipherCloak/CVE-2026-41651 | 23 Apr 2026 +1.4 d | backfilled | 7 | PoC via PoC Index |
| 0xBlackash/CVE-2026-41651 | 24 Apr 2026 +1.8 d | backfilled | 13 | PoC via PoC Index |
| 0xredash/CVE-2026-41651 | 24 Apr 2026 +1.8 d | backfilled | 13 | PoC via PoC Index |
| ashrafzaryouh/CVE-2026-41651 | 24 Apr 2026 +1.8 d | backfilled | 13 | PoC via PoC Index |
| baph00met/CVE-2026-41651 | 24 Apr 2026 +1.9 d | backfilled | 17 | PoC |
| mawussid/CVE-2026-41651-Python | 6 May 2026 +14 d | backfilled | 2 | PoC |
| 0xDVRK/CVE-2026-41651 | 25 Jul 2026 +94 d | backfilled | 0 | PoC |
| gbuyssens/CVE-2026-41651 | 2 Aug 2026 +102 d | backfilled | 0 | PoC via PoC Index
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
| iapetus12/cohort-htb | 8 Aug 2026 +108 d | backfilled | 0 | PoC |
| Thhc10/CVE-2026-41651 | 23 Sep 2026 +154 d | backfilled | 0 | PoC |
| thiscitze/cve-2026-41651-poc | 6 Nov 2026 +197 d | 14 Nov 2026 | 0 | PoC |
| 0xv01d/CVE-2026-41651 | 13 Nov 2026 +205 d | 14 Nov 2026 | 0 | PoC via PoC Index |
Pending 2
| Repository | Created | Found by us | Stars | Assessment |
|---|---|---|---|---|
| mazofeifaalfaro/check_pack2theroot | 30 Apr 2026 +7.6 d | backfilled | 0 | Pending · repository unavailable (HTTP 404) |
| 1nt1m4cy/HTB-Cohort | 4 Nov 2026 +195 d | 15 Nov 2026 | 2 | Pending |
Informational 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| dinosn/pack2theroot-lab | 25 Apr 2026 +2.6 d | 8 | Informational · write-up
Flags · score 45
Below the suspicion threshold (50); does not change the assessment. |
| Kowntaewook/CVE-2026-41651-analysis | 6 May 2026 +14 d | 0 | Informational · write-up |
Suspicious or fake 2
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Vozec/CVE-2026-41651 | 23 Apr 2026 +20 h | 128 | Fake |
| shibaaa204/Pack2TheRoot | 29 Apr 2026 +7.1 d | 13 | Fake |
Only PoCs count toward the first-PoC date and the characteristics below. "Backfilled" means we found the repository more than 30 days after it was created. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 12 PoC reposPOST /api/validate
- Body markers
"url":"http://127.1:80/status"- Ports
- 80
- Seen in
- 1 repo: iapetus12/cohort-htb
- Evidence
- iapetus12/cohort-htb/README.md:28
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/api/validate(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [80] (msg:"GG PoC-Monitor CVE-2026-41651 PackageKit PackageKit exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/validate"; http.request_body; content:"|22|url|22|:|22|http://127.1:80/status|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-41651; classtype:web-application-attack; sid:9436776; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: PackageKit PackageKit exploit attempt (CVE-2026-41651)
id: gg-pocmon-cve-2026-41651-9436776
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-41651. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-41651
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/api/validate'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.41651