Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-41651-poc — CVE-2026-41651 - PackageKit 1.0.2-1.3.4 TOCTOU local privilege escalation, independent C implementation (PoC + exploit by thiscitze) | Kitploit
Tools/GitHubGitHub/thiscitze/cve-2026-41651-poc
Privilege EscalationVulnerability AnalysisExploitationRed TeamingPayload Development
GitHubthiscitze/cve-2026-41651-poc

cve-2026-41651-poc

CVE-2026-41651 - PackageKit 1.0.2-1.3.4 TOCTOU local privilege escalation, independent C implementation (PoC + exploit by thiscitze)

View Repository
14 days agoNot yet reviewed
Share

pk2root — CVE-2026-41651

Independent C implementation of the PackageKit "Pack2TheRoot" TOCTOU privilege escalation. No python3-gi, no shell wrapper: one binary drives the system bus, builds the packages and waits for the SUID shell.

PackageKit 1.0.2 .. 1.3.4   vulnerable
PackageKit >= 1.3.5         fixed

Lab use only: run it as an unprivileged user on a VM you own.

How it works

PackageKit keeps the caller-supplied flags and paths in transaction->cached_transaction_flags / cached_full_paths and only re-validates them at dispatch time (pk-transaction.c). Three cooperating bugs make the window usable:

  1. InstallFiles() stores both values unconditionally, even while the transaction is already RUNNING.
  2. pk_transaction_set_state() silently drops backward transitions (RUNNING → WAITING_FOR_AUTH) but the overwrite already happened.
  3. The scheduler reads the cached flags when the idle callback fires, not when authorization happened.

Sequence:

CreateTransaction()
InstallFiles(SIMULATE, dummy.deb)   -> no polkit prompt, state READY
InstallFiles(NONE,     payload.deb) -> flags/paths overwritten, state stays
                                       RUNNING
idle callback -> install payload as root -> postinst runs install -m 4755

SIMULATE is a PkBitfield: on 1.3.x the enum value is 2, so the wire value is 1 << 2 = 4. NONE is 0.

Build

Needs glib-2.0, gio-2.0 and their headers:

# Debian/Ubuntu
sudo apt install build-essential pkg-config libglib2.0-dev
# RHEL/Fedora
sudo dnf install gcc pkgconf-pkg-config glib2-devel

make

CI is not wired up; the tree is compile-checked with zig cc -target x86_64-linux-gnu against the Debian 12 glib headers, and builds on any distro with the packages above.

Usage

./pk2root                 # first safe dir, 90s wait
./pk2root --timeout 180
./pk2root --suid-dir /dev/shm
./pk2root --keep          # keep the generated .deb/.rpm for inspection

The tool prints every step and exits non-zero when no SUID file appears (patched host or lost race). On success it execs the SUID bash with -p.

Requirements on the target:

  • unprivileged local user
  • PackageKit running on the system bus, version 1.0.2–1.3.4
  • dpkg-deb or rpmbuild available to that user
  • a writable directory without nosuid/noexec (probed automatically)

Notes

  • The SUID bash is left at <dir>/.pk2root_suid; remove it after testing.
  • The race is timing sensitive. Retry a few times before concluding the host is patched.
  • PackageKit 2.x renumbered the flags; this tool targets 1.3.x only, which is the whole affected range.

Prior art / references

  • CVE-2026-41651 advisory and the upstream fix in PackageKit 1.3.5 (pk-transaction.c, commit 76cfb675)
  • Deutsche Telekom Security "Pack2TheRoot" write-up
  • Public PoCs by 0xBlackash and Vozec — useful for cross-checking the D-Bus sequence; this implementation is written independently and shares no code with them.

License

MIT — see LICENSE.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →