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 package | Versions | Reported by |
|---|---|---|
| PackageKit PackageKit | >= 1.0.2, <= 1.3.4 | CVE List |
| PackageKit | Not 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-PackageKit08 | Not specified | CVE List |
| packagekit_project packagekit | from 1.0.2 before 1.3.5 | NVD |
All scores
| GitHub_M | 8.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| redhat-SADP | 8.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Classification
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
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41651 changed 2026-07-15 | CVE Terms of Use |
| NVD | CVE-2026-41651 changed 2026-11-11 | Public domain |