---
title: "HOST-CTR-007 Docker Default Ulimits Not Set"
canonical: https://openvapt.com/checks/HOST-CTR-007.html
html: https://openvapt.com/checks/HOST-CTR-007.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-007 Docker Default Ulimits Not Set

Checks whether the Docker daemon sets default ulimits (open files and processes) for containers.

- Domain: Server
- Severity: Low
- Control category: Secure Configuration
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- CIS Controls v8: 4.1
- NIST CSF 2.0: PR.PS-01
- CWE: CWE-770
- NIST SP 800-53 Rev. 5: SC-6, CM-6
- Benchmark topic: CIS Docker Benchmark 2.7 (default ulimit) (topic only, no benchmark text)

## Why It Matters

Without default limits a container inherits the daemon's generous limits and can exhaust file descriptors or spawn processes until the host starves. Daemon-wide defaults protect every container that forgets to set its own.

## How It Detects

Reads /etc/docker/daemon.json and fails unless default-ulimits contains at least nofile and nproc.

## How to Fix

Add to /etc/docker/daemon.json:  "default-ulimits": {"nofile": {"Name": "nofile", "Hard": 65536, "Soft": 32768}, "nproc": {"Name": "nproc", "Hard": 4096, "Soft": 2048}}  and restart Docker; tune the numbers to your workloads.

## How to Verify

```
docker info | grep -A3 -i ulimit  or  docker run --rm alpine sh -c 'ulimit -n; ulimit -u'  (your own test container)
```

## Learn the Theory

- [P9 Containers and Kubernetes](https://openvapt.com/academy/p9.md)
- [A5 Container Runtime Hardening Depth](https://openvapt.com/academy/a5.md)

## References

- [Docker documentation, dockerd daemon reference](https://docs.docker.com/reference/cli/dockerd/)
- [CIS Docker Benchmark (referenced by recommendation number)](https://www.cisecurity.org/benchmark/docker)

## Source Code

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

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

---

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-007.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
