Xdg Desktop PortalApplication · Flatpak

CVE-2026-40354

MEDIUM · 6.3 CVSS v3.1 Published 2026-04-11
Fix available
A fix is available. Upgrade to 1.20.4 or later.
See remediation →
65/100
Remediation priority · Elevated
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Flatpak xdg-desktop-portal before 1.20.4 and 1.21.x before 1.21.1 allows any Flatpak app to trash any file in the host context via a symlink attack on g_file_trash.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Flatpak xdg-desktop-portal before versions 1.20.4 and 1.21.1 contains a symlink attack vulnerability in g_file_trash that allows any sandboxed Flatpak application to trash files outside its sandbox in the host context, enabling unauthorized file system access.

MitigationUpdate xdg-desktop-portal to version 1.20.4, 1.21.1, or later to patch the symlink attack vector in g_file_trash.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Xdg Desktop PortalApplication
Affected:< 1.20.4= 1.21.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
High
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check if xdg-desktop-portal is installed
    Run 'which xdg-desktop-portal' or check your package manager (dpkg -l | grep xdg-desktop-portal, rpm -qa | grep xdg-desktop-portal)
    Affected if xdg-desktop-portal is not found on the system - the vulnerability does not apply
  2. Determine the installed version of xdg-desktop-portal
    Run 'xdg-desktop-portal --version' or check via package manager: 'dpkg -s xdg-desktop-portal' (Debian) or 'rpm -qi xdg-desktop-portal' (RHEL/Fedora)
    Affected if Command fails or package not found - portal is not installed
  3. Compare installed version against affected ranges
    The affected versions are: < 1.20.4 and = 1.21.0. Compare your installed version from step 2 to these ranges
    Affected if Installed version is less than 1.20.4 OR equals exactly 1.21.0 - the system is vulnerable
  4. Verify xdg-desktop-portal is actively running (required for exploit)
    Run 'ps aux | grep xdg-desktop-portal' or check for the portal socket at ~/.cache/xdg-desktop-portal or /run/user/<uid>/xdg-desktop-portal
    Affected if Portal is not running - the specific attack vector may not be reachable even with a vulnerable version

You are affected if xdg-desktop-portal is installed, running, and its version is either below 1.20.4 or exactly 1.21.0.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 1.20.4 or later
Fixed in 1.20.4
Interim mitigation

Update xdg-desktop-portal to version 1.20.4, 1.21.1, or later to patch the symlink attack vector in g_file_trash.

Recommended fix High confidence

xdg-desktop-portal >= 1.20.4 or >= 1.21.1

  1. Update your system package manager to get the latest xdg-desktop-portal packages
  2. For systems using package managers (apt, dnf, pacman, etc.), run: sudo apt update && sudo apt upgrade xdg-desktop-portal (or equivalent for your distro)
  3. After updating, restart the xdg-desktop-portal service if it is running: systemctl restart xdg-desktop-portal or kill the running process to force restart on next use
  4. Verify the installed version matches or exceeds the fixed release: xdg-desktop-portal --version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Xdg Desktop Portal Scoped from the published advisory
  • Consultation2.0 h
  • Implementation2.0 h
  • Testing3.0 h
  • Review / QA1.0 h
8.0 hours of engineering $1,390
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,224.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-40354 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-40354 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data