---
title: The Docker daemon should restrict containers from acquiring new privileges
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > The Docker daemon should restrict
  containers from acquiring new privileges
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# The Docker daemon should restrict containers from acquiring new privileges
Classification:complianceFramework:cis-dockerControl:2.15 
## Description{% #description %}

The Docker daemon should start every container with no-new-privileges.

## Rationale{% #rationale %}

With no-new-privileges, a process in a container keeps the privileges it started with: setuid and setgid binaries and file capabilities grant it nothing more.

## Audit{% #audit %}

Look for no-new-privileges on the dockerd command line and in `daemon.json`:

```bash
ps -o args= -C dockerd
grep '"no-new-privileges"' /etc/docker/daemon.json
```

Datadog reads `--no-new-privileges` on the dockerd command line or, if it isn't set there, `no-new-privileges` in `daemon.json`. It passes the rule when the setting is true and fails it otherwise.

## Remediation{% #remediation %}

Set `no-new-privileges` in `daemon.json`:

```json
{
  "no-new-privileges": true
}
```

Then restart the daemon with `systemctl restart docker`.

## Impact{% #impact %}

Programs that need setuid binaries, such as `sudo` inside a container, stop working.

## Default value{% #default-value %}

Containers can gain privileges through setuid and setgid binaries.

## References{% #references %}

1. [https://docs.docker.com/reference/cli/dockerd/](https://docs.docker.com/reference/cli/dockerd/)
1. [https://github.com/moby/moby/pull/20727](https://github.com/moby/moby/pull/20727)
