---
title: Shared host IPC namespace
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Infrastructure as Code (IaC)
  Security > IaC Security Rules > Shared host IPC namespace
---

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

# Shared host IPC namespace

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**Id:** `dockercompose-shared-host-ipc-namespace` 

**Platform:** DockerCompose

**Severity:** Medium

**Category:** Resource Management

#### Learn More{% #learn-more %}

- [Provider Reference](https://docs.docker.com/reference/compose-file/services/#ipc)

### Description{% #description %}

Sharing the host IPC (inter-process communication) namespace (`ipc: host`) allows a container to access the shared memory segments, semaphores, and message queues that host processes use for communication. This can lead to cross-process data leakage, enabling a compromised container to intercept or inject data into host IPC channels. Services should omit the `ipc` field or restrict it to container-local IPC rather than `host`.

## Compliant Code Examples{% #compliant-code-examples %}

```yaml
services:
  private:
    image: alpine
    ipc: private
  shareable:
    image: alpine
    ipc: shareable
```

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```yaml
services:
  risky:
    image: alpine
    ipc: host
```
