CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-23953

Incus Container Escape: The Classic Newline Injection Returns

Alon Barad
Alon Barad
Software Engineer

Jan 23, 2026·6 min read·51 visits

Executive Summary (TL;DR)

Incus failed to sanitize newlines in container environment variables. By injecting a CRLF sequence via a crafted YAML configuration, an attacker can append malicious LXC hooks (like `lxc.hook.pre-start`) to the underlying configuration file. This results in immediate Host RCE as root when the container starts.

A high-severity configuration injection vulnerability in Incus allows authenticated users to escape containers and execute arbitrary commands on the host system with root privileges by injecting newline characters into environment variables.

The Hook: It's 2026 and We're Still Doing This

In the world of modern infrastructure, we like to think we've moved past the sins of the 90s. We wrap everything in JSON, YAML, or Protocol Buffers to avoid the messiness of raw text parsing. But under the hood of Incus (the spiritual successor to LXD), the ancient spirits of line-based configuration files still slumber.

Incus is a powerful system container manager. It takes your high-level intent—"I want a container with these limits and these environment variables"—and translates it into instructions for the low-level container runtime, LXC. This translation layer is where the magic happens, and unfortunately, where the magic sometimes goes horribly wrong.

CVE-2026-23953 isn't a complex heap overflow or a race condition in the kernel. It is a classic, almost nostalgic, Newline Injection vulnerability. It relies on the disconnect between how a modern API accepts data (YAML, which loves multi-line strings) and how the backend consumes it (a flat text file where a new line means a new instruction). It is the infrastructure equivalent of SQL injection, but instead of dropping tables, we are dropping the container boundary.

The Flaw: A Failure of Translation

The vulnerability lies in how Incus processes the environment.* configuration keys. When you configure a container in Incus, you can pass environment variables that should exist inside that container. For example, setting environment.FOO=bar tells Incus to ensure the environment variable FOO is set to bar inside the instance.

To achieve this, Incus takes these key-value pairs and writes them into the LXC configuration file (lxc.conf). The format LXC expects is lxc.environment = KEY=VALUE. This file is line-delimited. Each setting is on its own line. Do you see where this is going?

The flaw is a lack of sanitization. The developer assumed that environment variables would be simple strings. However, the input vector is YAML. YAML has absolutely no problem with multi-line strings—in fact, it has specific syntax (| or |-) to handle them gracefully. Incus accepted these multi-line strings and blindly concatenated them into the configuration generator.

The Code: The Smoking Gun

Let's look at the vulnerable code in internal/server/instance/drivers/driver_lxc.go. This is the translator that speaks "Incus" to "LXC".

Around line 1081, we see this innocent-looking block:

// Processing environment variables starting with "environment."
after, ok := strings.CutPrefix(k, "environment.")
if ok {
    // VULNERABLE: No check for \n in 'after' (key) or 'v' (value)
    err = lxcSetConfigItem(cc, "lxc.environment", fmt.Sprintf("%s=%s", after, v))
    if err != nil {
        return nil, err
    }
}

The lxcSetConfigItem function takes that formatted string and appends it to the config file. It doesn't check if the string contains newlines. It just writes bytes.

If a user provides a value v that looks like this: "val\nlxc.hook.pre-start = /bin/sh..."

The resulting config file on disk becomes:

lxc.environment = KEY=val
lxc.hook.pre-start = /bin/sh...

LXC reads this file linearly. It sees the environment variable definition, and then, on the very next line, it sees a valid hook definition. The parser is tricked into executing commands.

The Exploit: Escaping the Box

To exploit this, we need to be an authenticated user with permissions to launch containers or modify their configuration. This is common in CI/CD environments or shared hosting setups where users are given a slice of the pie but not the whole server.

We craft a YAML payload using the block scalar syntax |- to force a literal newline injection. Our goal is to inject lxc.hook.pre-start, which executes a command on the host before the container namespace is even fully brought up. This runs as root (or whatever user the Incus daemon runs as).

Here is the attack chain:

  1. Launch a dummy container (or update an existing one).
  2. Inject the payload into an environment variable.
  3. Start the container to trigger the config parsing.
incus launch images:alpine/edge --ephemeral poc << EOF 
config:
  # The key name handles the prefix, the value handles the injection
  environment.PWNED: |-
    anything
    lxc.hook.pre-start = /bin/sh -c "id > /tmp/hacked_by_incus"
EOF

When Incus generates the config for this container, it writes: lxc.environment = PWNED=anything

And immediately follows it with: lxc.hook.pre-start = /bin/sh -c "id > /tmp/hacked_by_incus"

The next time this container starts, that hook fires. You have successfully executed code on the host system.

The Impact: Why Panic?

This is a Container Escape. In the hierarchy of container vulnerabilities, this is the boss fight. If you expose the Incus socket to untrusted users (even if you think you've limited them with quotas and restrictions), they own your infrastructure.

The CVSS score is 8.7 (High), largely because it requires low privileges (PR:L) and has a changed scope (S:C). The impact on Confidentiality and Integrity is High (C:H, I:H).

> [!ALERT] > This grants full root access to the underlying host OS. An attacker can install persistence, steal secrets from other containers, access the host filesystem, or pivot to the internal network.

It is functionally equivalent to giving the user sudo access on the host, just with extra steps.

The Fix: Stopping the Bleeding

The fix is embarrassingly simple, as most fixes for these types of bugs are. The maintainers added a validation check to ensure that neither the key nor the value contains a newline character before writing it to the config.

Here is the logic added in the patch:

if strings.Contains(after, "\n") || strings.Contains(v, "\n") {
    return nil, errors.New(fmt.Sprintf("Environment cannot contain newline characters"))
}

By explicitly forbidding \n in the input, the injection vector is closed. This forces the environment variables to remain on a single line, preventing them from bleeding into new configuration directives.

If you are running Incus, you need to patch immediately. If you cannot patch, you must audit your user list. Anyone with access to the incus group is effectively root until this is fixed.

Official Patches

IncusGHSA Advisory and Patch Details

Fix Analysis (1)

Technical Appendix

CVSS Score
8.7/ 10
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N

Affected Systems

Incus <= 6.0.5Incus 6.1.0 - 6.20.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
Incus
LXC
<= 6.0.56.0.6
Incus
LXC
>= 6.1.0, <= 6.20.06.21.0
AttributeDetail
CWECWE-93 (Improper Neutralization of CRLF Sequences)
CVSS8.7 (CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N)
Attack VectorAdjacent Network (requires Incus socket access)
Privileges RequiredLow (Authenticated Incus User)
ImpactHost Remote Code Execution (RCE)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1611Escape to Host
Privilege Escalation
T1059Command and Scripting Interpreter
Execution
CWE-93
Improper Neutralization of CRLF Sequences ('CRLF Injection')

The software does not neutralize or incorrectly neutralizes CR and LF characters before writing data to a file, allowing injection of new lines and manipulation of file structure.

Known Exploits & Detection

GitHub Security AdvisoryOriginal PoC demonstrating lxc.hook.pre-start injection

Vulnerability Timeline

Public Disclosure and CVE Assigned
2026-01-22
Patch Released in 6.0.6 and 6.21.0
2026-01-22

References & Sources

  • [1]GHSA-x6jc-phwx-hp32
  • [2]CWE-93: CRLF Injection

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 13 hours ago•CVE-2026-53634
4.3

CVE-2026-53634: Missing Authorization in Code16 Sharp Quick Creation Command Controller

Code16 Sharp versions from 9.0.0 up to (but not including) 9.22.3 are vulnerable to a missing authorization flaw in the Quick Creation Command feature. The ApiEntityListQuickCreationCommandController fails to validate entity-level 'create' policies before returning administrative form designs or processing database modifications. Authenticated users with restricted access can bypass policy boundaries to access creation configurations and insert records.

Alon Barad
Alon Barad
6 views•5 min read
•about 14 hours ago•CVE-2026-49471
8.3

CVE-2026-49471: Unauthenticated Remote Code Execution in Serena MCP Toolkit via DNS Rebinding and Memory Poisoning

CVE-2026-49471 is a high-severity security vulnerability in Serena, an AI-assisted coding Model Context Protocol (MCP) toolkit. In versions prior to v1.5.2, Serena's built-in web dashboard exposes an unauthenticated Flask API on a predictable port. Lacking host validation and CSRF protections, this endpoint is vulnerable to DNS Rebinding. An attacker can lure a user to a malicious webpage, bypass the Same-Origin Policy (SOP), rewrite the AI agent's persistent memory, and execute arbitrary commands on the host operating system via the autonomous agent's shell execution engine.

Alon Barad
Alon Barad
11 views•5 min read
•about 14 hours ago•GHSA-MXWC-WH95-PW4G
5.3

GHSA-MXWC-WH95-PW4G: Denial of Service via Uncontrolled Recursion in Trapster DNS Parser

The trapster honeypot package is vulnerable to a remote denial of service (DoS) vulnerability due to uncontrolled recursion during the parsing of malformed DNS compression pointers in the decode_labels function.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 15 hours ago•GHSA-Q95X-7G78-RCCV
6.3

GHSA-Q95X-7G78-RCCV: Safe Rust Memory Corruption via Use-After-Free in oneringbuf Crate

A critical Use-After-Free (UAF) memory corruption vulnerability exists in the oneringbuf Rust crate prior to version 0.8.0. The vulnerability allows safe Rust code to instantiate and clone reference wrappers that point to heap-allocated ring buffers. Dropping one wrapper prematurely reclaims the backing memory, leading to dangling pointer references and subsequent Use-After-Free or Double Free states.

Amit Schendel
Amit Schendel
7 views•7 min read
•1 day ago•CVE-2026-53359
8.8

CVE-2026-53359: Use-After-Free in Linux Kernel KVM Shadow MMU (Januscape)

Januscape (CVE-2026-53359) is a critical Use-After-Free vulnerability in the x86 Shadow MMU component of the Linux Kernel's KVM subsystem. A logic error in shadow page tracking permits unauthorized page reuse without validating architectural execution roles, leading to dangling pointers in reverse mapping (rmap) tracking entries during guest memory teardown.

Amit Schendel
Amit Schendel
123 views•5 min read
•1 day ago•CVE-2026-48282
10.0

CVE-2026-48282: Unauthenticated Path Traversal and Arbitrary File Write in Adobe ColdFusion Remote Development Services

CVE-2026-48282 is a critical unauthenticated path traversal and arbitrary file write vulnerability in the Remote Development Services (RDS) component of Adobe ColdFusion. The vulnerability allows a remote, unauthenticated attacker to bypass directory boundaries and write arbitrary files, including CFML-based web shells, onto the host server. This flaw is actively exploited in the wild and enables full unauthenticated remote code execution under the privileges of the ColdFusion service account.

Alon Barad
Alon Barad
49 views•6 min read