The vulnerability is an authorization bypass in Dozzle's agent mode, where label-based access controls for containers were not enforced for shell access. The root cause lies in the FindContainer function within the agentService (internal/support/container/agent_service.go). This function, when looking up a container by its ID, failed to pass along the user's label filters to the agent client. Consequently, the agent would find any container matching the ID, regardless of the user's permissions.
The patch 620e59aa246347ba8a27e68c532853b8a5137bc1 rectifies this by modifying two key functions. First, agentService.FindContainer is updated to pass the labels to the agent client. Second, the agent client's Client.FindContainer function in internal/agent/client.go is updated to accept these labels and include them in the request sent to the remote agent. This ensures that the label filters are correctly applied, preventing unauthorized access. During an exploit, these two FindContainer functions would be on the execution path, making them key indicators in a runtime profile.