CVE-2026-41651
JSON

8.8high

PackageKit vulnerable to TOCTOU Race on Transaction Flags leads to arbitrary package installation as root

Severity
8.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.56% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
PackageKit PackageKit>= 1.0.2, <= 1.3.4CVE List
PackageKitNot specified
Not affected: from 0:1.2.8-8.el10_2 before *, from 0:1.2.8-8.el10_0.1 before *, from 0:1.1.10-2.el7_9.1 before *, from 0:1.1.12-8.el8_10 before *, from 0:1.1.12-6.el8_4.1 before *, from 0:1.1.12-6.el8_6.1 before *
CVE List
compat-PackageKit08Not specifiedCVE List
packagekit_project packagekitfrom 1.0.2 before 1.3.5NVD

All scores

GitHub_M8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
redhat-SADP8.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-367

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

PackageKit es una capa de abstracción D-Bus que permite al usuario gestionar paquetes de forma segura utilizando una API multiplataforma y multiarquitectura. PackageKit entre las versiones 1.0.2 y 1.3.4, ambas inclusive, es vulnerable a una condición de carrera de tiempo de verificación a tiempo de uso (TOCTOU) en los indicadores de transacción que permite a los usuarios sin privilegios instalar paquetes como root y, por lo tanto, conduce a una escalada de privilegios local. Esto está parcheado en la versión 1.3.5. Un usuario local sin privilegios puede instalar paquetes RPM arbitrarios como root, incluyendo la ejecución de scriptlets RPM, sin autenticación. La vulnerabilidad es una condición de carrera TOCTOU en ’transaction -> cached_transaction_flags’ combinada con una protección silenciosa de máquina de estados que descarta transiciones inversas ilegales mientras deja los indicadores corruptos en su lugar. Existen tres errores en ’src/pk-transaction.c’: 1. Sobrescritura incondicional de indicadores (línea 4036): ’InstallFiles()’ escribe los indicadores proporcionados por el llamador en ’transaction -> cached_transaction_flags’ sin verificar si la transacción ya ha sido autorizada/iniciada. Una segunda llamada sobrescribe ciegamente los indicadores incluso mientras la transacción está EN EJECUCIÓN. 2. Rechazo silencioso de transición de estado (líneas 873-882): ’pk_transaction_set_state()’ descarta silenciosamente las transiciones de estado inversas (p. ej., ’RUNNING’ ? ’WAITING_FOR_AUTH’) pero la sobrescritura de indicadores del paso 1 ya ocurrió. La transacción continúa ejecutándose con indicadores corruptos. 3. Lectura tardía de indicadores en tiempo de ejecución (líneas 2273-2277): La devolución de llamada de inactividad del planificador lee cached_transaction_flags en el momento del despacho, no en el momento de la autorización. Si los indicadores fueron sobrescritos entre la autorización y la ejecución, el backend ve los indicadores del atacante.

References

https://github.com/PackageKit/PackageKit/security/advisories/GHSA-f55j-vvr9-69xvexploit, vendor-advisory
https://github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L2273-L2277product
https://github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L4036product
https://github.com/PackageKit/PackageKit/blob/04057883189efa225a7c785591aa87cb299782f8/src/pk-transaction.c#L873-L882product
https://github.security.telekom.com/2026/04/pack2theroot-linux-local-privilege-escalation.htmlexploit, third-party-advisory
http://www.openwall.com/lists/oss-security/2026/04/22/6mailing-list, patch, third-party-advisory
https://access.redhat.com/security/cve/CVE-2026-41651vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2460604issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41651.json
https://access.redhat.com/errata/RHSA-2026:22146vendor-advisory
https://access.redhat.com/errata/RHSA-2026:19601vendor-advisory
https://access.redhat.com/errata/RHSA-2026:19141vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-41651 changed 2026-07-15CVE Terms of Use
NVDCVE-2026-41651 changed 2026-11-11Public domain