Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40354

CVE-2026-40354: Flatpak Path Traversal Vulnerability

CVE-2026-40354 is a path traversal flaw in Flatpak xdg-desktop-portal that allows apps to trash host files via symlink attacks. This article covers the technical details, affected versions, security impact, and patches.

Published: April 17, 2026

CVE-2026-40354 Overview

CVE-2026-40354 is a symlink attack vulnerability in Flatpak xdg-desktop-portal that allows any Flatpak application to trash arbitrary files in the host context. The vulnerability exists in versions prior to 1.20.4 and versions 1.21.x before 1.21.1, where improper handling of symbolic links in the g_file_trash function enables malicious sandboxed applications to escape containment and delete files on the host system.

Critical Impact

A malicious Flatpak application can leverage symlink manipulation to delete arbitrary files on the host system, potentially leading to data loss or denial of service conditions by removing critical system or user files.

Affected Products

  • Flatpak xdg-desktop-portal versions before 1.20.4
  • Flatpak xdg-desktop-portal versions 1.21.x before 1.21.1

Discovery Timeline

  • April 11, 2026 - CVE-2026-40354 published to NVD
  • April 13, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40354

Vulnerability Analysis

This vulnerability is classified under CWE-61 (UNIX Symbolic Link (Symlink) Following), a category of file system vulnerabilities where an application follows symbolic links without proper validation. In the context of xdg-desktop-portal, the issue arises within the g_file_trash function, which is responsible for moving files to the system trash.

The flaw allows a sandboxed Flatpak application—which should have limited filesystem access—to craft a symbolic link pointing to an arbitrary file on the host system. When the portal service processes a trash request for this symlink, it follows the link and moves the target file to the trash instead of the symlink itself. This effectively allows the sandboxed application to delete any file accessible to the portal service, breaking the security boundaries that Flatpak is designed to enforce.

The vulnerability requires local access and has high attack complexity, as the attacker must successfully create and manipulate symlinks in a manner that exploits the race condition or improper validation in the trash operation.

Root Cause

The root cause of CVE-2026-40354 lies in insufficient validation of file paths before performing the trash operation. The g_file_trash function follows symbolic links without verifying that the resolved target path remains within the permitted scope of the requesting Flatpak application. This design oversight enables a Time-of-Check Time-of-Use (TOCTOU) style attack where the symlink can be manipulated between validation and the actual file operation.

Attack Vector

The attack requires local access to the system where a vulnerable version of xdg-desktop-portal is installed. An attacker would need to install or run a malicious Flatpak application that:

  1. Creates a symbolic link within its sandbox pointing to a target file on the host filesystem
  2. Requests the xdg-desktop-portal service to trash the symbolic link
  3. The portal service follows the symlink and moves the actual target file to trash

The vulnerability mechanism involves the improper handling of symbolic links in the g_file_trash function. When a Flatpak application requests to trash a file, the portal service should verify that the operation stays within the application's permitted sandbox boundaries. However, due to improper symlink resolution, the service follows symbolic links to their targets, allowing operations on files outside the sandbox.

For detailed technical information, refer to the GitHub Security Advisory GHSA-rqr9-jwwf-wxgj and the Openwall OSS-Security Discussion.

Detection Methods for CVE-2026-40354

Indicators of Compromise

  • Unexpected file deletions or files appearing in system trash without user interaction
  • Flatpak applications creating symbolic links pointing to sensitive system or user files
  • Unusual activity in xdg-desktop-portal logs related to trash operations

Detection Strategies

  • Monitor xdg-desktop-portal service logs for trash operations involving symbolic links
  • Implement file integrity monitoring on critical system files to detect unauthorized deletions
  • Audit installed Flatpak applications for unexpected symlink creation behavior

Monitoring Recommendations

  • Enable verbose logging for xdg-desktop-portal to capture detailed information about file operations
  • Deploy endpoint detection solutions that can identify symlink-based attacks within sandbox environments
  • Regularly review trash contents for files that should not have been deleted by sandboxed applications

How to Mitigate CVE-2026-40354

Immediate Actions Required

  • Update xdg-desktop-portal to version 1.20.4 or later for the 1.20.x branch
  • Update xdg-desktop-portal to version 1.21.1 or later for the 1.21.x branch
  • Review recently installed Flatpak applications for suspicious behavior
  • Implement backup procedures for critical files until patching is complete

Patch Information

Security patches are available through the official xdg-desktop-portal releases:

  • xdg-desktop-portal version 1.20.4 - Patches the vulnerability for the stable 1.20.x branch
  • xdg-desktop-portal version 1.21.1 - Patches the vulnerability for the 1.21.x development branch

Users should update through their distribution's package manager or build from source using the patched releases. For additional details on the security fix, consult the GitHub Security Advisory.

Workarounds

  • Limit the use of untrusted Flatpak applications until patched versions are deployed
  • Review and restrict Flatpak permissions using tools like Flatseal to minimize filesystem access
  • Consider temporarily disabling the trash portal functionality if critical systems are at risk
bash
# Check current xdg-desktop-portal version
pkg-config --modversion xdg-desktop-portal

# Update via package manager (example for Fedora/RHEL-based systems)
sudo dnf update xdg-desktop-portal

# Update via package manager (example for Debian/Ubuntu-based systems)
sudo apt update && sudo apt upgrade xdg-desktop-portal

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechFlatpak

  • SeverityLOW

  • CVSS Score2.9

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-61
  • Technical References
  • GitHub Release v1.20.4

  • GitHub Release v1.21.1

  • GitHub Security Advisory GHSA-rqr9-jwwf-wxgj

  • Openwall OSS-Security Discussion
  • Related CVEs
  • CVE-2026-39977: flatpak-builder Path Traversal Flaw

  • CVE-2026-34079: Flatpak Path Traversal Vulnerability

  • CVE-2026-34078: Flatpak Symlink RCE Vulnerability

  • CVE-2024-32462: Flatpak Sandbox Escape RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English