← Lab /Security & privacy

Flatpak apps can escape Linux sandboxes via PipeWire’s unauthenticated cookie

PipeWire’s PulseAudio compatibility layer allows any client with socket access to load arbitrary modules and execute code, enabling sandbox escape.

Security & privacy Embrace The Red 30 Jul 2026 Disclosure Real-world evidence

Published as “Escaping Linux Sandboxes via PipeWire (CVE-2026-5674)”

Why it matters

Flatpak (and other sandboxed) applications with audio permission can break out of their sandbox, exposing user files and desktop sessions.

Summary

The author discovered that PipeWire’s PulseAudio compatibility layer never validates the authentication cookie and enables module loading by default. By sending a fake cookie and loading a malicious LADSPA module, a Flatpak app with only pulseaudio socket permission can cause PipeWire to dlopen an attacker-controlled library, executing code in the full user context. The exploit was reproduced on Debian 13 (aarch64) and Ubuntu 24.04 (x86_64) and also works from Docker containers. Mitigations include validating the cookie, disabling default module loading, and restricting dlopen paths, which have been patched by Red Hat.

What they found 3

  1. PipeWire never validates the PulseAudio authentication cookie.

    “client->authenticated = true; // cookie value never compared”

  2. Module loading is enabled by default, allowing any authenticated client to load arbitrary modules.

    “#define DEFAULT_ALLOW_MODULE_LOADING "true"”

  3. dlopen() is called without path validation, enabling arbitrary library execution.

    “handle = dlopen(path, RTLD_NOW);”

Caveats 3

  • I also verified the negative case with --socket=pulseaudio removed, to make sure the exploit fails.
  • The exploit requires the sandboxed app to have a host-writable path such as /tmp.
  • PipeWire runs as a user-level service, so the escape does not provide root privileges.

What’s new here 4

  • Identifies that PipeWire does not validate the PulseAudio authentication cookie.
  • Shows that default module loading allows arbitrary module injection.
  • Demonstrates a sandbox escape from a minimal Flatpak app using only audio and temporary file permissions.
  • Provides mitigations and notes that patches have been released.