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: no validation of dockerargs values allows privilege escalation #13

Open

Description

@SimplicityGuy

Summary

User-supplied dockerargs values from config files are passed directly to docker run/docker exec without any validation. This allows injecting dangerous Docker flags.

Location

entrypoint.sh lines 55, 81

Attack Vector

A config file with crafted dockerargs can inject flags such as:

  • --privileged — full host device access
  • -v /:/host — mount the host filesystem
  • --cap-add SYS_ADMIN — elevated capabilities
  • --network=host — access host network stack

Any of these can lead to complete host compromise from within the container.

Recommended Fix

Implement an allowlist of safe Docker flags, or validate and reject known dangerous flags before passing dockerargs to Docker commands.

# Example: reject dangerous flags
if echo "${DOCKERARGS}" | grep -qE '(--privileged|--cap-add|--device)'; then
    echo "Error: disallowed dockerargs detected"
    exit 1
fi

Severity

High

Activity

  1. added
    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

    security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions