Skip to main content
Vulnerability Database/CVE-2026-96807

CVE-2026-96807: Flatpak Path Traversal Vulnerability

CVE-2026-96807 is a path traversal vulnerability in Flatpak before version 1.18.1 that allows malicious sandboxed apps to write files at arbitrary locations. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

CVE-2026-96807 Overview

CVE-2026-96807 is a symbolic link (symlink) following vulnerability in Flatpak versions before 1.18.1. A malicious sandboxed application can replace ~/.var/app/$appid/.ld.so with a symlink pointing to an arbitrary filesystem location. When Flatpak invokes regenerate_ld_cache, it follows the symlink and writes files at the attacker-selected path. The vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following. Neither the filename nor the file content is attacker-controlled, which substantially limits practical exploitability. The issue affects local Linux systems running Flatpak-packaged applications and is tracked in GitHub Security Advisory GHSA-99wv-m8rp-g58x.

Critical Impact

A sandboxed Flatpak application can force regenerate_ld_cache to write files outside its intended data directory, enabling limited integrity and availability impact against local files.

Affected Products

  • Flatpak versions prior to 1.18.1
  • Linux distributions shipping vulnerable Flatpak packages
  • Sandboxed applications relying on Flatpak's per-app runtime linker cache

Discovery Timeline

  • 2026-09-23 - CVE-2026-96807 published to the National Vulnerability Database (NVD)
  • 2026-09-23 - Last updated in NVD database

Technical Details for CVE-2026-96807

Vulnerability Analysis

Flatpak maintains a per-application linker cache at ~/.var/app/$appid/.ld.so to accelerate dynamic library resolution inside the sandbox. The regenerate_ld_cache routine rewrites this file when application data changes. The routine opens the target path without verifying that it is a regular file owned by the sandbox, and without using O_NOFOLLOW semantics on the final component.

A sandboxed application, which already has write access to its own ~/.var/app/$appid/ directory, can delete .ld.so and replace it with a symlink that references any path reachable by the user account running Flatpak. When regenerate_ld_cache next executes, the file write is redirected to the symlink target. The attacker does not control the file content or name, so the operation typically corrupts or overwrites an existing file rather than planting attacker chosen data.

Root Cause

The root cause is unsafe file handling during cache regeneration. Flatpak trusts the sandbox-writable .ld.so path and performs I/O without validating link status. This is a classic [CWE-61] symlink following flaw where a privileged or semi-privileged operation acts on a path controlled by a less trusted context.

Attack Vector

Exploitation requires a locally installed malicious Flatpak application. The attacker plants the symlink inside the sandbox and waits for or triggers a regenerate_ld_cache run. Impact is limited to integrity and availability on files the invoking user can write. Confidentiality is not affected because no data is disclosed to the attacker.

No public proof-of-concept exploit is available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. See the GitHub Security Advisory GHSA-99wv-m8rp-g58x for upstream technical details.

Detection Methods for CVE-2026-96807

Indicators of Compromise

  • Presence of a symbolic link at ~/.var/app/<appid>/.ld.so pointing outside the application's data directory.
  • Unexpected modification timestamps on system or user files coinciding with Flatpak application launches.
  • Flatpak runtime errors or crashes triggered by corrupted files that were overwritten via the symlink.

Detection Strategies

  • Enumerate ~/.var/app/*/.ld.so paths on managed Linux endpoints and flag entries where lstat reports a symlink.
  • Correlate Flatpak process execution with file writes to paths outside ~/.var/app/<appid>/ using Linux audit rules on openat and symlinkat.
  • Review installed Flatpak applications against known-good sources; treat sideloaded or unsigned bundles as higher risk.

Monitoring Recommendations

  • Enable auditd rules on ~/.var/app/ subtrees to log symlink creation events attributable to sandboxed processes.
  • Monitor Flatpak version inventory across the fleet and alert on hosts running versions prior to 1.18.1.
  • Track integrity of user-writable configuration and dotfiles that a local user could overwrite through this flaw.

How to Mitigate CVE-2026-96807

Immediate Actions Required

  • Upgrade Flatpak to version 1.18.1 or later on all Linux endpoints.
  • Audit installed Flatpak applications and remove any from untrusted publishers.
  • Inspect ~/.var/app/<appid>/.ld.so on each user account and remove entries that are symbolic links.

Patch Information

The upstream fix is included in Flatpak 1.18.1. Refer to GitHub Security Advisory GHSA-99wv-m8rp-g58x for commit references and distribution-specific backports. Apply vendor updates from your Linux distribution as they become available.

Workarounds

  • Restrict Flatpak installations to trusted remotes such as the official Flathub repository.
  • Avoid running untrusted sandboxed applications with user accounts that hold sensitive writable files.
  • Periodically clear or recreate ~/.var/app/<appid>/ directories for applications that no longer require persistent state.
bash
# Configuration example: upgrade Flatpak and validate the .ld.so path type
sudo apt update && sudo apt install --only-upgrade flatpak
flatpak --version
find ~/.var/app -maxdepth 2 -name '.ld.so' -type l -print

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.