CVE-2026-33898
Description
Incus is a system container and virtual machine manager. Prior to version 6.23.0, the web server spawned by incus webui incorrectly validates the authentication token such that an invalid value will be accepted. incus webui runs a local web server on a random localhost port. For authentication, it provides the user with a URL containing an authentication token. When accessed with that token, Incus creates a cookie persisting that token without needing to include it in subsequent HTTP requests. While the Incus client correctly validates the value of the cookie, it does not correctly validate the token when passed int the URL. This allows for an attacker able to locate and talk to the temporary web server on localhost to have as much access to Incus as the user who ran incus webui. This can lead to privilege escalation by another local user or an access to the user's Incus instances and possibly system resources by a remote attack able to trick the local user into interacting with the Incus UI web server. Version 6.23.0 patches the issue.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/lxc/incus/v6/cmd/incusGo | < 6.23.0 | 6.23.0 |
Affected products
1Patches
1d81d49e746e1incus/remote: Actually validate the token code in `incus webui`
2 files changed · +21 −1
cmd/incus/remote_unix.go+20 −1 modified@@ -214,6 +214,7 @@ func (t remoteProxyTransport) RoundTrip(r *http.Request) (*http.Response, error) type remoteProxyHandler struct { s incus.InstanceServer transport http.RoundTripper + url string mu *sync.RWMutex connections *uint64 @@ -238,6 +239,12 @@ func (h remoteProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { *h.connections++ h.mu.Unlock() + // Don't allow cross-origin requests. + origin := r.Header.Get("Origin") + if origin != "" && origin != h.url { + return + } + // Basic auth. if h.token != "" { // Parse query URL. @@ -248,6 +255,8 @@ func (h remoteProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { token := values.Get("auth_token") if token != "" { + // If a token was passed through the URL, persist it as a cookie. + tokenCookie := http.Cookie{ Name: "auth_token", Value: token, @@ -259,11 +268,21 @@ func (h remoteProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.SetCookie(w, &tokenCookie) } else { + // If not, attempt to pull it from the cookie. cookie, err := r.Cookie("auth_token") - if err != nil || cookie.Value != h.token { + if err != nil { + // Fail authentication if no cookie can be found. w.WriteHeader(http.StatusUnauthorized) return } + + token = cookie.Value + } + + // Check the user token against the expected value. + if token != h.token { + w.WriteHeader(http.StatusUnauthorized) + return } }
cmd/incus/webui_unix.go+1 −0 modified@@ -98,6 +98,7 @@ func (c *cmdWebui) Run(cmd *cobra.Command, args []string) error { transactions: &transactions, token: token, + url: "http://" + server.Addr().String(), } // Print address.
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-453r-g2pg-cxxqghsaADVISORY
- github.com/lxc/incus/security/advisories/GHSA-453r-g2pg-cxxqnvdVendor AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2026-33898ghsaADVISORY
- github.com/lxc/incus/commit/d81d49e746e15dad35de39dc0ace0cedfba7d2f7ghsaWEB
- github.com/lxc/incus/releases/tag/v6.23.0ghsaWEB
News mentions
0No linked articles in our index yet.