/

CVE-2026-33898

Severity:

HIGH RISK

(8.8)

Improper Authentication in Incus Web UI Local Web Server

CVE-2026-33898

Analyzed

Vulnerability type

Category:

Improper Authentication

CWE:

CWE-287

Impact:

Privilege Escalation and Unauthorized Incus Instance Access

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Incus incus webui command starts a local web server that accepts an authentication token via URL and then persists it in a cookie for subsequent requests.

Due to improper validation of the token in the URL, an attacker who can reach the temporary localhost web server may gain the same Incus access as the user who launched incus webui, enabling local privilege escalation or remote abuse via UI interaction tricks.

Affected context

This vulnerability affects environments where:

  • Users run incus webui, which spawns a temporary HTTP server bound to localhost on a random port.
  • Browser-based authentication relies on a token provided in the URL, which is then copied into a cookie.
  • Other local users or processes can scan localhost ports or influence browser traffic.
  • Remote attackers can trick a local user (e.g., via phishing, malicious links, or local malware) into interacting with the Incus Web UI.

The risk is higher on multi-user systems or desktops where users run Incus with elevated or extensive permissions.

Exploit preconditions

  • Attack surface: Temporary HTTP server listening on localhost on a random port, started by incus webui.
  • Required access (local attacker):
  • Ability to enumerate or guess the random localhost port where the Incus Web UI is listening.
  • Network access to 127.0.0.1 on that port from the same host (e.g., as a different local user or process).
  • Required access (remote-assisted attacker):
  • Ability to convince the local user to interact with the Incus Web UI (e.g., via malicious browser navigation, scripts, or instructions).
  • Trigger point: HTTP requests sent to the Incus Web UI that include a (possibly invalid or forged) authentication token in the URL.
  • Why exploitation is possible: The server accepts invalid or improperly verified tokens from the URL as valid and establishes a session cookie from them, while only the cookie-based token is correctly validated later. This mismatch in validation logic lets an attacker bypass the intended authentication step and gain a session with the user's level of Incus access.

Why this happens

The fundamental issue is an improper authentication check (CWE-287) caused by inconsistent validation between different authentication paths.

The web server behind incus webui is designed to:

  1. Provide a URL embedding a one-time authentication token.
  2. Accept that token via URL, then set a persistent cookie for further authenticated requests.

While the code correctly validates the token contained in the cookie, it does not enforce equivalent validation when the token is supplied via the URL itself. As a result, the presence of any token-like value in the URL is treated as sufficient for authentication, bypassing the intended proof-of-possession requirement. This pattern reflects a common bug class where multiple authentication mechanisms or entry points are implemented but their verification logic diverges, leaving at least one path effectively unauthenticated or weakly authenticated.

Potential impact

  • An unprivileged local user may gain the same Incus privileges as the user who ran incus webui.
  • An attacker can access, manage, or manipulate the victim's Incus containers and virtual machines.
  • Incus operations (start/stop/delete instances, modify configuration, access console logs) can be performed without the victim's awareness.
  • Indirect access to underlying system resources exposed via Incus-managed workloads could occur.
  • In multi-user environments, this can serve as a stepping stone for broader local privilege escalation.

General mitigation guidance

Effective mitigation focuses on strong, consistent authentication enforcement and minimizing exposure of local administrative interfaces:

  • Ensure all authentication entry points (URL tokens, cookies, headers) share a single, consistent validation routine that rejects malformed or unexpected tokens.
  • Treat URL-embedded tokens as secrets and verify them with the same strictness as tokens stored in cookies or other credentials.
  • Constrain local web administrative interfaces to the minimal viable exposure, for example by:
  • Restricting binding to specific loopback addresses or namespaces.
  • Applying OS-level access controls (e.g., firewalls or socket permissions) to limit which users/processes can connect.
  • Design token lifetimes to be short and single-use where possible, invalidating them immediately after initial authentication.
  • Reduce the permission scope of the Incus process where operationally possible, applying least-privilege principles to limit blast radius if UI access is abused.

How teams detect issues like this

Detection can target both code-level weaknesses and suspicious runtime behavior:

  • Static analysis and code review:
  • Look for authentication logic that handles tokens differently across multiple code paths (e.g., URL parameters vs. cookies vs. headers).
  • Flag any path where a token's structure or existence is checked without verifying its authenticity against a server-side store or cryptographic mechanism.
  • Identify handlers that set authenticated session cookies without a preceding robust credential or token verification call.
  • Policy and testing:
  • Incorporate security tests that attempt to authenticate with malformed, random, or replayed tokens, including via alternate channels (URL, cookie, query parameters).
  • Enforce architectural policies that centralize authentication decisions in a dedicated component rather than scattering checks across handlers.
  • Operational monitoring:
  • Log authentication attempts, including source (URL parameter vs. cookie) and validation outcomes, and review anomalies such as successful sessions established from clearly invalid token values.
  • Automated code scanning tools, SAST platforms, or custom linters can be configured to search for inconsistent authentication patterns and missed validation steps, especially around local admin UIs.

Sources

SourceLink
github.comgithub.com/lxc/incus/security/advisories/GHSA-453r-g2pg-cxxq

Frequently asked

questions

Direct remote exploitation is limited because the Incus Web UI listens on localhost only. However, a remote attacker can leverage it indirectly by tricking a local user into interacting with the UI (for example via crafted browser interactions or local malware), effectively turning the user's browser into a conduit.

A local attacker needs network access to 127.0.0.1 on the specific random port used by incus webui and the ability to send HTTP requests to it. A remote attacker needs some influence over the local user's environment (such as driving the browser or getting the user to follow instructions) to cause interactions with the Incus Web UI.

Centralize authentication logic and enforce the same strict token verification on all entry points. Any session establishment—whether via URL parameters, cookies, or headers—should go through a single routine that verifies token authenticity, validity, and binding to the user before setting an authenticated session.

Use a uniform authentication framework, avoid custom ad-hoc token handling, and ensure that all new endpoints defer to shared authentication middleware. Complement this with regular security reviews, automated tests that attempt to bypass authentication through alternate channels, and design patterns that minimize the exposure and lifetime of local administrative web interfaces.

Find out what's already
exploitable in your codebase.