CVE-2026-23953
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-23953 is a newline injection vulnerability in Incus, a system container and virtual machine manager, that allows authenticated local users to inject arbitrary lifecycle hooks into container configurations, resulting in arbitrary command execution on the host. It affects Incus versions up to and including 6.0.5 (LTS branch) and versions 6.1.0 through 6.20.0. The vulnerability was published on January 22, 2026, with fixes planned for versions 6.0.6 and 6.21.0. It carries a CVSS v3.1 base score of 8.7 (High) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is improper neutralization of CRLF sequences (CWE-93) in the initLXC function within internal/server/instance/drivers/driver_lxc.go (around line 1081). When environment variables are passed in a container's config block, their values are not checked for embedded newline characters before being written into the container's lxc.conf file. An attacker can craft a multiline YAML string as an environment variable value (e.g., environment.FOO) that injects additional LXC configuration directives — such as lxc.hook.pre-start — into the generated config file. The fix adds a check that rejects any environment variable key or value containing \n characters before the config item is set (GitHub Advisory, Patch File).

Impact

Successful exploitation allows a member of the incus group to break container isolation and execute arbitrary commands as root on the host system, effectively achieving full host compromise. Both confidentiality and integrity of the host are rated High, as an attacker can read sensitive host data and modify the host filesystem or running processes. Availability is not directly impacted. On IncusOS, exploitation requires a minor payload adjustment to use a writable directory such as /tmp for the validation step (GitHub Advisory, Red Hat Bugzilla).

Exploitability

A public proof-of-concept exploit script (environment_newline_injection.sh) is available and was published alongside the advisory, demonstrating arbitrary command execution that writes a file to the host root filesystem (/newline_injection_command_exec_poc) (GitHub Advisory). Exploitation requires low privileges (membership in the incus group) and no user interaction, but is limited to adjacent network access. There is no evidence of in-the-wild exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score is approximately 0.012–0.032%, indicating a low near-term exploitation probability (GitHub Advisory). The vulnerability was discovered and reported by rmcnamara-snyk (Snyk).

Exploitation steps

  1. Identify a target: Confirm the target system is running a vulnerable version of Incus (≤ 6.0.5 or 6.1.0–6.20.0) and that you have membership in the incus group.
  2. Craft a malicious YAML config: Prepare a container launch configuration with a multiline environment variable value that injects an additional LXC directive, for example:
config:
  environment.FOO: |-
    abc
    lxc.hook.pre-start = /bin/sh -c "id > /newline_injection_command_exec_poc"
  1. Launch the container: Execute incus launch images:alpine/edge --ephemeral poc << EOF with the malicious config block, causing Incus to write the injected lxc.hook.pre-start directive into the container's lxc.conf.
  2. Trigger hook execution: When the container starts, LXC reads the injected lxc.hook.pre-start entry and executes the specified command as root on the host.
  3. Verify host code execution: Confirm that the output file (e.g., /newline_injection_command_exec_poc) was created on the host filesystem with root-owned content, proving arbitrary command execution outside the container (GitHub Advisory).

Indicators of compromise

  • File System: Unexpected files created in the host root directory (e.g., /newline_injection_command_exec_poc) or other host paths by the Incus daemon process; new scripts or binaries placed in /tmp or other writable directories on the host.
  • Logs: Incus or LXC log entries showing container launch with environment variable values containing newline characters; unexpected lxc.hook.pre-start entries in generated lxc.conf files located under /run/incus/.
  • Process: Unusual child processes spawned by the Incus daemon (e.g., /bin/sh, bash, curl, wget) at container start time; processes running as root that are children of the LXC hook execution path.
  • Network: Outbound connections from the host initiated by the Incus daemon process to unexpected external IP addresses, potentially indicating reverse shell activity (GitHub Advisory).

Mitigation and workarounds

Upgrade Incus to version 6.0.6 (for the 6.0.x LTS branch) or 6.21.0 or later (for the 6.1.x+ branch) as soon as these releases are available. As an interim workaround, restrict membership in the incus group to only fully trusted users, since exploitation requires group membership. Monitor container launch configurations for environment variable values containing newline characters. The patch adds a validation check in driver_lxc.go that returns an error if any environment variable key or value contains \n before writing to lxc.conf (GitHub Advisory, Patch File).

Community reactions

The vulnerability was discovered by rmcnamara-snyk from Snyk and disclosed responsibly to the Incus maintainer stgraber, who published the advisory on January 22, 2026. Snyk published a technical blog post covering this and related Incus vulnerabilities (Snyk Labs). The Hacker Wire covered the disclosure on social media platforms including Mastodon and Bluesky. Downstream distributions including Debian and Fedora have issued security updates for their packaged versions of Incus (Linux Security).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

lxd

Affected

sid

incus: 6.0.5-8

Fixed

trixie

lxd: 5.0.2+git20231211.1364ae4-9+deb13u3

Fixed

Ubuntu

Unknown

bionic (esm-infra)

lxd

Unknown

devel

incus

Not Affected

focal (esm-apps)

lxd

Unknown

noble

incus

Unknown

noble (esm-apps)

incus

Unknown

resolute

incus

Unknown

resolute (esm-apps)

incus

Unknown

xenial (esm-infra-legacy)

lxd

Unknown

Alpine

Fixed

edge

incus-feature: 6.21.0-r0, 6.0.5-r6

Fixed

v3.23

incus-feature: 6.21.0-r0, 6.0.5-r6

Fixed

SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-86738CRITICAL9.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86734HIGH7.1
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86735MEDIUM5.9
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86737MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86736MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management