/

CVE-2026-48750

Severity:

CRITICAL RISK

(9.9)

Symlink Following (CWE-73) in Incus Exec Endpoint API

CVE-2026-48750

Deferred

Vulnerability type

Category:

Symlink Arbitrary File Write

CWE:

CWE-73

Impact:

Arbitrary File Write and Potential Command 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 symlink-handling vulnerability in Incus affects the record-output behavior of the instance execution endpoint. When an attacker can cause the exec-output directory to be a symlink, command output files may be written to an unintended location, potentially enabling arbitrary command execution.

Affected context

The issue occurs in Incus instance execution workflows that enable the record-output parameter on the /instances/$name/exec endpoint. Risk depends on the exec-output directory being controllable as a symlink and on the resulting output files being written with permissions or locations that affect executable code, configuration, or other security-sensitive resources.

Exploit preconditions

  • Attack surface: The instance execution API and its output-recording path
  • Required access: Sufficient access to invoke the endpoint and influence

the relevant instance filesystem or directory state

  • Trigger point: Creation of stdout and stderr output files after an

executed command requests output recording

  • Why exploitation is possible: The file-writing logic follows a

symlinked output directory instead of ensuring that the destination remains

within the intended path

Why this happens

The underlying bug is failure to treat a filesystem path component as untrusted when creating output files. File operations follow a symbolic link supplied or influenced through the instance environment, allowing a pathname intended for an internal output directory to resolve elsewhere. This maps to CWE-73, External Control of File Name or Path, because external influence over path resolution can redirect writes to security-sensitive locations.

Potential impact

  • An attacker may overwrite files outside the intended exec-output directory.
  • Arbitrary content could be placed in executable scripts, configuration

files, or other sensitive paths.

  • The affected host or instance may execute attacker-controlled commands.
  • Confidential data or service availability could be impacted.
  • A compromised instance could provide a path toward broader infrastructure

compromise, depending on privileges and isolation controls.

General mitigation guidance

Mitigation generally focuses on preventing symlink-based path redirection and

reducing the consequences of unintended file writes.

Common defensive patterns include:

  • Opening output files using symlink-resistant filesystem operations and

directory-relative handles where supported.

  • Verifying that the resolved destination remains within the intended output

directory before writing.

  • Using exclusive file creation and rejecting pre-existing symbolic links.
  • Treating instance-controlled paths as untrusted input.
  • Applying restrictive permissions and least-privilege identities to the

service and managed instances.

  • Limiting which files and directories can be affected by command output.
  • Using secure-by-default output locations and narrowly scoped API

authorization.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for file creation or open operations that follow

attacker-influenced paths without symlink protections.

  • Code review checks for filesystem writes beneath instance-controlled

directories.

  • Tests that exercise symbolic-link substitution and verify containment of

all generated output files.

  • Runtime monitoring for output files appearing outside the approved

exec-output directory.

  • Policy enforcement that restricts execution API access and records unusual

output-path behavior.

Automated security review tools can help identify path-resolution and

symlink-handling patterns during development.

Sources

SourceLink
github.comgithub.com/canonical/lxd/security/advisories/GHSA-9j25-mm2h-2f76
github.comgithub.com/lxc/incus/security/advisories/GHSA-73hr-m85f-64v9

Frequently asked

questions

It can be exploitable through the Incus API when an attacker has sufficient

authorization to invoke instance execution and influence the relevant

filesystem state. Exposure depends on API accessibility and deployment

permissions.

The attacker generally needs permission to use the instance exec endpoint,

along with a way to make the output directory resolve through a symbolic

link or otherwise control the destination path.

Ensure output file creation rejects symbolic links, uses symlink-resistant

filesystem APIs, and verifies that every destination remains inside the

intended directory.

Treat filesystem paths derived from instances or API inputs as untrusted,

enforce least privilege, add symlink-substitution tests, and monitor for

writes outside approved directories.

Find out what's already
exploitable in your codebase.