/

CVE-2026-48749

Severity:

CRITICAL RISK

(9.9)

Arbitrary File Write (CWE-73) in Incus Image Handling

CVE-2026-48749

Deferred

Vulnerability type

Category:

External Control of File Name or Path

CWE:

CWE-73

Impact:

Host File Disclosure, Arbitrary File Modification, and Possible Code Execution

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical path-handling vulnerability in Incus allows a specially crafted image to read or create and modify arbitrary files on the host system. Where an attacker can introduce or cause processing of such an image, the resulting host compromise may include arbitrary command execution.

Affected context

The vulnerability occurs in Incus image processing before version 7.2.0 when image contents or metadata influence filesystem paths used by the host. Risk depends on whether an untrusted party can supply, import, or trigger processing of a specially crafted image and on the permissions available to the Incus service.

Exploit preconditions

  • Attack surface: Incus image import, storage, or processing workflows
  • Required access: Ability to provide or cause processing of an untrusted image
  • Trigger point: Host-side handling of crafted image paths or contents
  • Why exploitation is possible: Insufficiently constrained paths may allow image-controlled filesystem operations outside the intended storage location

Why this happens

The underlying bug is an external-control-of-file-name-or-path weakness mapped to CWE-73. Image-controlled names, paths, or archive entries are insufficiently restricted before being used in host filesystem operations. Without canonicalization, containment checks, and strict destination controls, specially crafted input can escape the intended storage boundary and access unrelated host files.

Potential impact

  • An attacker may read sensitive files from the host
  • An attacker could create or overwrite arbitrary host files
  • Host configuration or security controls may be modified
  • Incus service privileges may be abused to affect other workloads
  • Arbitrary command execution on the host may be possible
  • Confidentiality, integrity, and availability of hosted containers or virtual machines could be affected

General mitigation guidance

Mitigation generally focuses on enforcing a strict trust boundary between

image content and host filesystem paths.

Common defensive patterns include:

  • Restricting image-controlled paths to approved storage directories
  • Canonicalizing paths and enforcing destination containment checks
  • Rejecting traversal sequences, absolute paths, links, and ambiguous path forms
  • Using safe archive-extraction and file-creation APIs
  • Processing images with least-privilege service identities
  • Separating image ingestion from sensitive host filesystem operations
  • Limiting which users or services may upload, import, or process images
  • Monitoring and protecting sensitive host files from unauthorized modification

How teams detect issues like this

Detection approaches may include:

  • Static analysis for archive extraction and filesystem APIs receiving image-derived paths
  • Code review checks for missing canonicalization, containment validation, or link handling
  • Tests using traversal, absolute-path, symbolic-link, and unusual encoding cases
  • Runtime monitoring for image-processing services accessing files outside approved directories
  • Policy enforcement that restricts image sources and requires trusted image validation
  • Automated security review tools that flag externally controlled filesystem paths

Sources

SourceLink
github.comgithub.com/canonical/lxd/security/advisories/GHSA-vghh-5rfx-xhq8
github.comgithub.com/lxc/incus/security/advisories/GHSA-2q3f-q5pq-g8wv

Frequently asked

questions

It can be exploitable through a remote or management interface when an

attacker is allowed to upload, import, or otherwise trigger processing of a

crafted image. The exact exposure depends on Incus access controls and

deployment architecture.

The attacker generally needs a path to introduce an image or influence an

image-processing workflow. The practical impact also depends on the

privileges held by the Incus service.

Ensure image-controlled paths cannot escape an approved storage directory,

reject unsafe archive entries and links, and perform processing with

least-privilege permissions.

Treat images and archives as untrusted input, apply canonicalization and

containment checks before every host filesystem operation, use security-focused

extraction libraries, and monitor image-processing activity.

Find out what's already
exploitable in your codebase.