/

CVE-2026-24740

Severity:

CRITICAL RISK

(9.9)

Improper Access Control in Dozzle Agent Shell Endpoints

CVE-2026-24740

Analyzed

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-284, CWE-863

Impact:

Privilege Escalation and Container Compromise via Unauthorized Shell Access

Severity:

CRITICAL RISK

(9.9)

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

A flaw in Dozzle's agent-backed shell endpoints allows users who are supposed to be restricted by label filters (for example, label=env=dev) to bypass those restrictions by directly targeting container IDs.

Under these conditions, an attacker can obtain an interactive root shell inside out-of-scope containers on the same agent host, such as env=prod, leading to full compromise of those containers.

Affected context

This vulnerability affects deployments of Dozzle that:

  • Use the agent-backed shell feature to provide interactive shells into containers, and
  • Rely on label-based filters (e.g., label=env=dev) to constrain which containers a given user can access.

In such environments, users are expected to operate only on containers matching assigned labels, but the shell endpoints accept explicit container IDs and fail to consistently enforce those label-based access restrictions.

The vulnerability manifests on the agent host where both in-scope and out-of-scope containers (e.g., dev and prod) are running and accessible via the same Dozzle agent.

Exploit preconditions

  • Attack surface: Dozzle's agent-backed shell HTTP/WebSocket endpoints exposed through the Dozzle UI or API.
  • Required access: Ability to authenticate or otherwise reach Dozzle with permissions intended to be limited by label filters (e.g., a tenant or user who should only see env=dev containers).
  • Trigger point: Issuing a shell request that directly targets a container by its ID or reference, instead of selecting it through the filtered label-based interface.
  • Why exploitation is possible: The backend shell endpoint authorizes access based on container identity without consistently re-applying label filters or scope checks. As a result, any container accessible to the agent on the host can be targeted by ID, bypassing the intended label-based restrictions described by CWE-284 (Improper Access Control) and CWE-863 (Incorrect Authorization).

Why this happens

The underlying issue is an authorization gap in how Dozzle enforces container access policies for shell sessions.

While the UI or higher-level logic applies label filters to restrict which containers a user should see and interact with, the agent-backed shell endpoint does not consistently enforce those same constraints when a container is referenced directly by ID.

This separation between "what is visible" and "what is actually authorized" leads to a classic Improper Access Control pattern (CWE-284), compounded by Incorrect Authorization (CWE-863), where the system assumes label filtering is sufficient but fails to verify that a requested container is truly within the user's permitted scope before granting shell access.

Potential impact

  • Attackers may obtain an interactive root shell in out-of-scope containers, including production or other sensitive workloads.
  • Compromise of confidential data, configuration files, and secrets stored within affected containers.
  • Ability to install backdoors, modify application code, or alter runtime environment in targeted containers.
  • Lateral movement within the container host network or to other services reachable from compromised containers.
  • Escalation from a low-privileged, dev-only account to effective administrative control over multiple environments.

General mitigation guidance

Effective mitigation focuses on enforcing consistent, least-privilege authorization at the point where shell sessions are created:

  • Ensure that every shell endpoint on the agent revalidates the user's permissions against the target container, including label-based scope checks, before starting a session.
  • Treat label filters as an authorization boundary, not just a UI filter, and centralize access decisions in a single, auditable authorization layer that all endpoints must use.
  • Design shell features around explicit role- and attribute-based access control (RBAC/ABAC), where access is determined by policy that considers user identity, container attributes, and environment sensitivity.
  • Reduce the privilege of shells provided by automation tools whenever possible (e.g., non-root users, constrained capabilities, and restricted namespaces) to limit blast radius if authorization controls fail.
  • Isolate highly sensitive containers (such as production workloads) onto separate agent hosts or networks, so that a compromise in one scoped environment does not automatically expose critical containers.

How teams detect issues like this

Organizations can look for this class of issue and its exploitation using a combination of review and monitoring:

  • Code and config review: Examine Dozzle's shell-related handlers to confirm that authorization checks are applied to the target container, not just the UI listing, and that label-based restrictions are enforced server-side.
  • Static analysis patterns: Flag endpoints that accept container IDs and start shell sessions without passing through a centralized authorization function or policy engine.
  • Access logging and audit trails: Enable detailed logging for shell session creation, capturing user identity, requested container ID, and applied filters. Alert on shell access to containers from users whose expected scope does not include those containers.
  • Policy enforcement: Use admission controls, RBAC policies, and host-based monitoring to detect and restrict interactive shells in sensitive environments, regardless of which management tool initiates them.
  • Automated security testing tools and CI-integrated checks can also be configured to highlight any path where user-scoped filters are applied only at the presentation layer but not at the enforcement layer.

Sources

SourceLink
github.comgithub.com/amir20/dozzle/commit/620e59aa246347ba8a27e68c532853b8a5137bc1
github.comgithub.com/amir20/dozzle/releases/tag/v9.0.3
github.comgithub.com/amir20/dozzle/security/advisories/GHSA-m855-r557-5rc5

Frequently asked

questions

Yes. Any user who can remotely reach the Dozzle interface or API, and who is granted shell access constrained by label filters, may exploit this issue by targeting container IDs directly, assuming network access to the Dozzle agent is available.

The attacker needs logical access to Dozzle with permissions that allow shell sessions into some containers (for example, dev containers restricted by labels). No direct host-level access is required, but the ability to initiate a shell via Dozzle is necessary.

Implement strict, centralized authorization for shell endpoints that validates the requested container against the user's allowed scope using label filters, roles, and environment policies. Ensure that backend authorization does not rely on UI-based filtering and that every shell creation path passes through the same access-control logic.

Design management and observability tools so that:

  • Authorization decisions are made on the server side for each operation, not just for what is shown in the UI.
  • All endpoints that act on specific resources (like containers) enforce policy based on resource attributes and user identity.
  • Shell access is treated as highly sensitive, with least privilege, hardened defaults, and strong auditing. Integrating security reviews and automated checks around access-control logic during development can further reduce the risk of similar flaws.
Find out what's already
exploitable in your codebase.