CVE-2026-96276 Overview
CVE-2026-96276 is a path traversal vulnerability in Flatpak's build-init command when handling SDK extensions. A malicious SDK container can declare an extension point with a crafted directory path containing .. sequences. When a developer runs flatpak build-init --writable-sdk --sdk-extension using that SDK, attacker-controlled files are written outside the intended working directory. The flaw stems from unsafe path resolution that permits parent directory traversal [CWE-22]. Exploitation requires only that a developer initialize a build using a compromised SDK, making supply-chain scenarios the primary attack path against Linux application developers using Flatpak.
Critical Impact
A malicious SDK can write arbitrary files to attacker-chosen locations on a developer's system during flatpak build-init, enabling code execution and host compromise.
Affected Products
- Flatpak (application sandboxing and distribution framework for Linux)
- Linux distributions packaging vulnerable Flatpak versions (see Red Hat advisory)
- Developer workstations and CI systems that run flatpak build-init against untrusted SDKs
Discovery Timeline
- 2026-09-23 - CVE CVE-2026-96276 published to NVD
- 2026-09-23 - Last updated in NVD database
Technical Details for CVE-2026-96276
Vulnerability Analysis
Flatpak's build-init subcommand prepares a build directory for a new Flatpak application. The --sdk-extension option instructs build-init to copy or link extension content from the SDK container into a subdirectory of the build root. The target subdirectory is derived from the extension's declared directory metadata field inside the SDK.
The vulnerability arises because build-init resolves this directory value through a path-joining routine that does not normalize or reject .. components. A malicious SDK author can set directory=../../../etc/example or similar values. During initialization, Flatpak then writes extension files to paths resolved outside the build root.
The result is arbitrary file write with the privileges of the invoking user. Because Flatpak developers commonly run build-init on their primary workstation, an attacker can drop files into $HOME, systemd user units, shell profile scripts, or SSH configuration to achieve persistence and code execution.
Root Cause
The root cause is missing path sanitization when combining a build root with an untrusted directory attribute supplied by SDK metadata [CWE-22]. The joining function preserves .. traversal segments, so the resolved absolute path can escape the intended parent directory. Flatpak treats the SDK's declared metadata as trusted input despite build-init accepting arbitrary SDK containers on the command line.
Attack Vector
An attacker publishes or distributes a Flatpak SDK containing a crafted extension point. A developer runs:
flatpak build-init --writable-sdk --sdk-extension=<name> <builddir> <appid> <sdk> <runtime>
During initialization, Flatpak reads the malicious directory field and writes SDK extension files to attacker-chosen filesystem locations. No additional user interaction beyond invoking build-init is required. See the GitHub Flatpak Security Advisory for advisory details.
No public proof-of-concept exploit is listed in the enriched data. Refer to the Red Hat CVE-2026-96276 advisory and Red Hat Bug Report #2539418 for further technical detail.
Detection Methods for CVE-2026-96276
Indicators of Compromise
- Unexpected files appearing under $HOME, ~/.config, ~/.local, ~/.ssh, or systemd user unit directories shortly after a flatpak build-init invocation.
- Flatpak build directories where extension content resolves to paths outside the declared build root.
- SDK manifests containing directory= values that include .. or absolute path separators.
Detection Strategies
- Audit Flatpak SDK metadata for extension points whose directory field contains .., leading /, or other traversal artifacts before use.
- Monitor process execution logs for flatpak build-init invocations that reference SDKs from untrusted repositories or remotes.
- Correlate flatpak process activity with file-creation events written outside the working directory tree passed on the command line.
Monitoring Recommendations
- Enable auditd or eBPF file-write telemetry for developer workstations that run Flatpak tooling and alert on writes outside expected build roots by the flatpak process.
- Track Flatpak remote configuration changes and flag additions of non-verified remotes such as third-party OCI registries.
- Review CI/CD pipelines that call flatpak build-init and log the SHA and origin of every SDK consumed.
How to Mitigate CVE-2026-96276
Immediate Actions Required
- Upgrade Flatpak to the patched version distributed by your Linux vendor. Consult the Red Hat CVE-2026-96276 page for fixed package versions.
- Stop running flatpak build-init --sdk-extension against SDKs from untrusted sources until patched packages are installed.
- Review recent build environments for files written outside expected build directories and rebuild affected workstations if tampering is suspected.
Patch Information
Red Hat and the Flatpak project have published fixes referenced in the GitHub Flatpak Security Advisory and Red Hat Bug Report #2539418. Apply distribution updates through your standard package manager (dnf, apt, zypper, pacman) once the fixed Flatpak release is available for your platform.
Workarounds
- Avoid the --sdk-extension option with SDKs that have not been reviewed and pinned to a trusted commit.
- Run flatpak build-init inside a container, VM, or unprivileged user account so that path traversal writes cannot reach sensitive host files.
- Restrict Flatpak remotes to trusted sources such as Flathub verified publishers and remove untrusted remotes with flatpak remote-delete.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

