---
id: CVE-2026-87798
title: >-
  Improper link resolution in the recursive file pull feature of the LXD CLI
  client in Canonical LXD versions 4.0.2 up to 6.9 (fixed in 4.0.14, 5.0.10 and
  5.21.8) on Linux allows an attacker with root access inside a virtual machine
  to wri…
summary: >-
  Improper link resolution in the recursive file pull feature of the LXD CLI
  client in Canonical LXD versions 4.0.2 up to 6.9 (fixed in 4.0.14, 5.0.10 and
  5.21.8) on Linux allows an attacker with root access inside a virtual machine
  to wri…
severity: medium
cvss: 5.8
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:N'
cwe:
  - CWE-59
vendor: Canonical
product: LXD
affected:
  - LXD >= 4.0.2 < 4.0.14
  - LXD >= 5.0.0 < 5.0.10
  - LXD >= 5.21.0 < 5.21.8
  - LXD >= 6.0 < 6.9
published: '2026-09-28'
updated: '2026-09-28'
sourceUpdated: '2026-09-28T15:12:32.657'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-87798'
references:
  - url: 'https://github.com/canonical/lxd/security/advisories/GHSA-mr8v-hx34-hfvf'
    label: security@ubuntu.com
tags:
  - nvd
  - cve.org
ingestedAt: '2026-09-28T14:12:02.169Z'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-09-28T14:04:47.395647Z'
---

## Overview

Improper link resolution in the recursive file pull feature of the LXD CLI client in Canonical LXD versions 4.0.2 up to 6.9 (fixed in 4.0.14, 5.0.10 and 5.21.8) on Linux allows an attacker with root access inside a virtual machine to write attacker-controlled files or directory trees to arbitrary paths on the client host, with the operator's privileges. The attacker does this by using a modified lxd-agent that returns inconsistent SFTP directory listings and Lstat results.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
