---
title: "HOST-CTR-004 Containers Mount the Docker Socket or Host Root"
canonical: https://openvapt.com/checks/HOST-CTR-004.html
html: https://openvapt.com/checks/HOST-CTR-004.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# HOST-CTR-004 Containers Mount the Docker Socket or Host Root

Looks for containers that bind-mount the Docker socket, the host root filesystem or sensitive host paths.

- Domain: Server
- Severity: High
- Control category: Access Control
- Fix effort: medium
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- CIS Controls v8: 3.3
- NIST CSF 2.0: PR.AA-05, PR.DS-01
- CWE: CWE-250, CWE-732
- NIST SP 800-53 Rev. 5: AC-6, SC-39

## Why It Matters

A container with /var/run/docker.sock can control Docker and therefore the host. Mounting / or /etc gives direct write access to host configuration.

## How It Detects

Reads Binds from /var/lib/docker/containers/*/hostconfig.json (needs root) and reports mounts of /var/run/docker.sock, /run/docker.sock, /, /etc, /root, /proc or /sys from the host.

## How to Fix

Remove these mounts. If a tool genuinely needs the Docker API, use a restricted socket proxy that allows only the required read-only calls.

## How to Verify

```
docker inspect --format '{{.Name}} {{.HostConfig.Binds}}' $(docker ps -aq)
```

## Learn the Theory

- [P9 Containers and Kubernetes](https://openvapt.com/academy/p9.md)

## References

- [Docker documentation, Protect the Docker daemon socket](https://docs.docker.com/engine/security/protect-access/)
- [NIST SP 800-190, Application Container Security Guide](https://csrc.nist.gov/pubs/sp/800/190/final)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/host/containers.go

Run it: `openvapt scan --only HOST-CTR-004`. Read it offline: `openvapt explain HOST-CTR-004`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/HOST-CTR-004.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
