CVE-2026-33897: Github.com/lxc/incus/v6 Incus Vulnerable To Arbitrary File Vulnerability

CRITICAL
Advisory Identifier: GHSA-83xr-5xxr-mh92
CVSS 9.9
CWE-1336
Published
Advisory Summary

CVE-2026-33897 is a CRITICAL (CVSS 9.9) incus vulnerable to arbitrary file vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Github.com/lxc/incus/v6 libraries in the Go ecosystem. The issue involves incus vulnerable to arbitrary file read and write through pongo templates. Remediation is available by upgrading affected packages to version 6.23.0.

CVE-2026-33897 at a Glance

CVE Identifier CVE-2026-33897
GHSA Identifier GHSA-83xr-5xxr-mh92
Severity CRITICAL
CVSS v3.1 Base Score 9.9
CWE Classification CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
Affected Product Github.com/lxc/incus/v6
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-33897

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.

github.com/lxc/incus/v6 fixed: 6.23.0
Upgrade github.com/lxc/incus/v6 to 6.23.0
github.com/lxc/incus fixed: Latest secure release
Upgrade github.com/lxc/incus to Latest secure release
Verify Direct and Transitive Dependencies

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-33897, 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-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. 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

### Summary Instance template files can be used to cause arbitrary read or writes as root on the host server. ### Details Incus allows for pongo2 templates within instances which can be used at various times in the instance lifecycle to template files inside of the instance. This particular implementation of pongo2 within Incus allowed for file read/write but with the expectation that the pongo2 chroot feature would isolate all such access to the instance's filesystem. This was allowed such that a template could theoretically read a file and then generate a new version of said file. Unfortunately the chroot isolation mechanism is entirely skipped by pongo2 leading to easy access to the entire system's filesystem with root privileges. ### Credit This issue was discovered and reported by the team at [7asecurity](https://7asecurity.com/)

CVE-2026-33897 Affected Github.com/lxc/incus/v6 Versions

2 component(s)
Fixed Versions:
6.23.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/lxc/incus/v6
Go
< 6.23.0
6.23.0
github.com/lxc/incus
Go
≤ 0.7.0

References

Frequently Asked Questions

What is CVE-2026-33897?
CVE-2026-33897 is a security vulnerability in Github.com/lxc/incus/v6 involving Incus vulnerable to arbitrary file read and write through pongo templates under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.
Which Github.com/lxc/incus/v6 versions are affected?
Affected versions include releases prior to 6.23.0 across affected packages: github.com/lxc/incus/v6, github.com/lxc/incus.
What version fixes CVE-2026-33897?
Upgrading to 6.23.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/lxc/incus/v6 affected?
Yes, github.com/lxc/incus/v6 is affected in releases prior to 6.23.0. Upgrade your dependency to 6.23.0 or later.
Is github.com/lxc/incus affected?
Yes, github.com/lxc/incus is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-33897?
CVE-2026-33897 has a CVSS v3.1 base score of 9.9 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-33897?
CVE-2026-33897 is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.).
How can I check Go dependencies for CVE-2026-33897?
Run the dependency tree command: 'inspect dependencies for github.com/lxc/incus/v6'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-83xr-5xxr-mh92",
  "modified" : "2026-03-27T17:17:03Z",
  "published" : "2026-03-27T17:17:03Z",
  "aliases" : [ "CVE-2026-33897" ],
  "summary" : "Incus vulnerable to arbitrary file read and write through pongo templates",
  "details" : "### Summary\nInstance template files can be used to cause arbitrary read or writes as root on the host server.\n\n### Details\nIncus allows for pongo2 templates within instances which can be used at various times in the instance lifecycle to template files inside of the instance. This particular implementation of pongo2 within Incus allowed for file read/write but with the expectation that the pongo2 chroot feature would isolate all such access to the instance's filesystem.\n\nThis was allowed such that a template could theoretically read a file and then generate a new version of said file.\n\nUnfortunately the chroot isolation mechanism is entirely skipped by pongo2 leading to easy access to the entire system's filesystem with root privileges.\n\n### Credit\nThis issue was discovered and reported by the team at [7asecurity](https://7asecurity.com/)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/lxc/incus/v6"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.23.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/lxc/incus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.7.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/lxc/incus/security/advisories/GHSA-83xr-5xxr-mh92"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33897"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/lxc/incus/commit/487edf5984fad89b0f762c03a7e211fdd38396fb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lxc/incus"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-27T17:17:03Z",
    "nvd_published_at" : "2026-03-26T23:16:20Z"
  }
}