Flatpak xdg-desktop-portal Symlink Attack Vulnerability Allowing Arbitrary File Trashing

Vulnerability

A vulnerability in Flatpak's xdg-desktop-portal prior to 1.20.4 and 1.21.x prior to 1.21.1 allows any Flatpak application to trash files in the host system. This issue arises from a symlink attack that exploits a time-of-check/time-of-use (TOCTOU) vulnerability in the Trash portal. The portal uses g_file_trash on paths that can be manipulated by the application, leading to the unintentional deletion of arbitrary host files.

Impact

Exploitation of this vulnerability allows for the unauthorized deletion of files on the host system.

Reproduction

To reproduce this vulnerability, a Flatpak application can be crafted to request the Trash portal to delete a file it owns. The application can then replace that file with a symlink, taking advantage of the timing difference between the file ownership check and the actual deletion process. This causes the portal to delete the target of the symlink on the host system, effectively trashing an arbitrary file.

Remediation

Users can update to Flatpak xdg-desktop-portal version 1.20.4 or 1.21.1 to address this vulnerability.

Added: Apr 11, 2026, 1:26 AM
Updated: Apr 11, 2026, 1:26 AM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
0.2
exploitability
3.2
remediation
0.0
relevance
5.7
threat
1.6
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.