/

CVE-2026-96276

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in Flatpak SDK Extension Builder

CVE-2026-96276

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Overwrite

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Flatpak can allow files from a malicious SDK container to be written outside the intended build working directory. The issue becomes risky when a developer runs flatpak build-init with writable SDK and SDK extension options against an SDK containing a crafted extension directory path.

Affected context

The vulnerability occurs in Flatpak build initialization workflows that process SDK extension metadata supplied by an SDK container. Deployments are potentially affected when the SDK is untrusted or has been tampered with, the extension is used with writable SDK-related options, and the directory path is resolved without constraining it to the intended working directory.

Exploit preconditions

  • Attack surface: Local Flatpak build tooling and SDK container metadata
  • Required access: Ability to provide or cause a developer to use a malicious or modified SDK container
  • Trigger point: Running flatpak build-init --writable-sdk --sdk-extension
  • Why exploitation is possible: The extension directory is resolved without rejecting parent-directory traversal, allowing the resulting path to escape the build directory

Why this happens

The underlying flaw is insufficient canonical-path validation when resolving an attacker-influenced directory path. A path containing parent-directory components can be interpreted outside the designated working directory if the application joins or resolves it without verifying that the final location remains within the approved base. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • Files outside the intended working directory may be created or overwritten
  • Developer files, build inputs, or generated artifacts could be modified
  • Build integrity and reproducibility could be compromised
  • Sensitive data may be exposed indirectly through altered build outputs or configuration
  • A malicious SDK could enable broader local compromise when overwritten files are later trusted or executed

General mitigation guidance

Mitigation generally focuses on treating SDK metadata as untrusted input and enforcing directory confinement.

Common defensive patterns include:

  • Rejecting absolute paths and parent-directory traversal components
  • Canonicalizing candidate paths before use and verifying they remain beneath the approved base directory
  • Using filesystem APIs that provide explicit directory confinement where available
  • Applying least-privilege permissions to build processes and working directories
  • Preferentially using trusted, integrity-verified SDK sources
  • Separating build workspaces from sensitive developer files and enforcing appropriate filesystem boundaries

How teams detect issues like this

Organizations can detect related path traversal risks through:

  • Static analysis searches for user-controlled paths passed to path-join, path-resolve, extraction, or file-write operations
  • Code review checks for missing canonicalization and containment validation
  • Tests using absolute paths, parent-directory components, symlinks, and unusual separators
  • CI policies requiring approved SDK provenance and integrity verification
  • Runtime monitoring for build processes writing outside their designated workspace

Sources

SourceLink
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-96276
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2539418
github.comgithub.com/flatpak/flatpak/security/advisories/GHSA-8qxj-x646-phcm

Frequently asked

questions

It is primarily a local workflow vulnerability. Exploitation generally requires a developer or build system to use a malicious or modified SDK container, although the SDK may have been obtained through a remote supply-chain channel.

The attacker needs to influence the SDK container or its extension metadata and have that SDK used with the affected Flatpak build initialization options.

Treat extension paths as untrusted, reject traversal and absolute paths, and verify after canonicalization that every target remains within the intended working directory.

Use trusted and integrity-verified SDK sources, apply least privilege to build environments, test path-handling edge cases, and enforce workspace-boundary checks in code review and CI.

Find out what's already
exploitable in your codebase.