/

CVE-2026-130786

Severity:

CRITICAL RISK

(9.9)

Configuration Injection (CWE-74) in Incus OCI Handling

CVE-2026-130786

Deferred

Vulnerability type

Category:

Configuration Injection

CWE:

CWE-74

Impact:

Host command execution and host path access

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

Incus can interpret line breaks in certain OCI configuration values as additional LXC directives when creating instances from controlled images. A user able to launch an instance from such an image may be able to influence host-level behavior, including running commands as root or accessing host paths.

Affected context

The issue affects Incus instance creation when OCI configuration values, including oci.entrypoint or oci.cwd, are translated into LXC configuration. It becomes risky when a user can launch instances from images they control and the resulting configuration is interpreted as LXC directives, including in restricted projects.

Exploit preconditions

  • Attack surface: Instance creation from OCI images in Incus
  • Required access: Permission to launch instances from an image containing controlled configuration values
  • Trigger point: Incus processes OCI config.json values or oci.entrypoint and oci.cwd keys while configuring the instance
  • Why exploitation is possible: Line breaks in values can cause injected content to be interpreted as additional LXC directives

Why this happens

The underlying issue is improper neutralization of special elements in configuration data, corresponding to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component. OCI values are incorporated into LXC configuration without adequately preventing line breaks from changing the structure or meaning of that configuration. As a result, data intended as a value may be interpreted as directives.

Potential impact

  • An attacker may be able to run commands as root on the host.
  • Crafted LXC directives could allow host paths to be bind-mounted into an instance.
  • Host access could lead to compromise of other workloads or sensitive data.
  • Project restrictions may not prevent these host-level effects if the vulnerable configuration path is reachable.

General mitigation guidance

Defensive approaches focus on preserving the boundary between configuration data and directives:

  • Encode or reject line breaks and other structural characters in values passed to downstream configuration parsers.
  • Prefer structured APIs or safe serialization methods over string concatenation when generating configuration.
  • Apply strict validation to image-provided configuration and treat image metadata as untrusted.
  • Limit who can launch instances from user-controlled images and use least-privilege controls for instance and host access.
  • Restrict host resource exposure and review project policies for defense in depth.

How teams detect issues like this

Review code paths that translate OCI metadata into LXC configuration, looking for unescaped values, newline handling, and string concatenation. Static analysis and code review can flag untrusted data flowing into configuration generation; policy checks can also restrict which image sources or metadata are accepted. Monitor instance creation and resulting configuration for unexpected hooks, mount directives, or other host-sensitive settings.

Sources

SourceLink
github.comgithub.com/lxc/incus/security/advisories/GHSA-3wxw-5gh2-j2x2

Frequently asked

questions

A user with permission to launch instances from an image they control may be able to reach the vulnerable configuration path. The impact depends on deployment permissions and controls.

Direct host access is not stated as a prerequisite. The described condition is the ability to launch an instance from an image containing controlled OCI configuration values.

Keep configuration values separate from directives by using structured configuration APIs and validating or safely encoding untrusted values before they reach downstream parsers.

Treat image metadata as untrusted, test configuration-generation paths for delimiter handling, and apply least-privilege policies to image use and instance creation.

Find out what's already
exploitable in your codebase.