CVE-2024-42472

10.0 CRITICAL

📋 TL;DR

This vulnerability in Flatpak allows malicious or compromised applications using persistent directories to escape sandbox restrictions and access/write files outside their intended scope. It affects Linux systems running vulnerable Flatpak versions when applications use the 'persistent' permission. The attack compromises both integrity and confidentiality of user data.

💻 Affected Systems

Products:
  • Flatpak
Versions: All versions prior to 1.14.10 and 1.15.10
Operating Systems: Linux distributions using Flatpak
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability requires applications using 'persistent' or '--persist' permission. Systems using system bubblewrap (/usr/bin/bwrap) need both Flatpak and bubblewrap updates.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete sandbox escape allowing malicious app to read/write arbitrary files in user's home directory, potentially leading to credential theft, data exfiltration, or system compromise.

🟠

Likely Case

Targeted data theft or modification by compromised applications, particularly affecting user documents, configuration files, and sensitive data in home directories.

🟢

If Mitigated

Limited impact with proper patching and updated bubblewrap, though race condition exploitation remains possible without complete fix.

🌐 Internet-Facing: LOW
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires malicious or compromised Flatpak application with persistent directory access. Race condition exploitation requires parallel malicious app instances.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Flatpak 1.14.10 or 1.15.10

Vendor Advisory: https://github.com/flatpak/flatpak/security/advisories

Restart Required: Yes

Instructions:

1. Update Flatpak to 1.14.10 (stable) or 1.15.10 (development). 2. Update bubblewrap to 0.6.3 (for 1.14.x) or 0.10.0 (for 1.15.x). 3. Restart affected applications. 4. For distributions using system bubblewrap, ensure both packages are updated.

🔧 Temporary Workarounds

Disable persistent permissions

linux

Avoid using applications with 'persistent' or '--persist' permission until patched

flatpak override --nofilesystem=home $APPID
flatpak override --persist= $APPID

🧯 If You Can't Patch

  • Remove or disable Flatpak applications using persistent permissions
  • Implement strict application vetting and only install trusted Flatpak applications

🔍 How to Verify

Check if Vulnerable:

Check Flatpak version: flatpak --version. If version is below 1.14.10 or 1.15.10, system is vulnerable when using applications with persistent permissions.

Check Version:

flatpak --version && bwrap --version 2>/dev/null || /usr/libexec/flatpak-bwrap --version 2>/dev/null

Verify Fix Applied:

Verify Flatpak version is 1.14.10+ or 1.15.10+. Check bubblewrap version: bwrap --version should be 0.6.3+ (for 1.14.x) or 0.10.0+ (for 1.15.x).

📡 Detection & Monitoring

Log Indicators:

  • Unusual file access patterns from Flatpak applications
  • Symlink creation/modification in ~/.var/app directories

Network Indicators:

  • Unexpected outbound connections from Flatpak applications

SIEM Query:

process.name:flatpak AND file.path:/home/* AND file.action:write

🔗 References

📤 Share & Export