Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.
This repository was archived by the owner on May 24, 2026. It is now read-only.

security: docker socket access enables container escape — document and mitigate #15

Open

Description

@SimplicityGuy

Summary

The container mounts the host Docker socket, granting it the ability to spawn arbitrary containers on the host. This is true even though the socket is mounted read-only (:ro), which only prevents writes to the socket file, not to the Docker API.

Location

  • docker-compose.yml — socket volume mount
  • Dockerfile — docker user/group setup

Risk

A process running inside this container (or a compromised cron job) can:

  • Start privileged containers on the host
  • Mount host filesystem paths into new containers
  • Execute commands in other running containers via docker exec
  • Read secrets from other containers' environments

Recommended Mitigations

  1. Docker socket proxy: Replace direct socket access with docker-socket-proxy to limit which Docker API endpoints are accessible
  2. seccomp/AppArmor: Apply a restrictive security profile to the container
  3. Documentation: Clearly document this risk in the README so operators understand the trust boundary before deploying

Severity

High (inherent architectural risk — mitigate and document rather than fully eliminate)

Activity

  1. added
    documentation
    security
    on Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions