Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Docker Socket Access
Cyber Security

Docker Socket Access

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: Cyber Security

Permission for a process on the runner to communicate with the Docker daemon through its socket. In a CI/CD context, this is sensitive because it can allow job code to create privileged containers, mount the host filesystem, and pivot from workflow execution to host-level control.

What Docker Socket Access Really Means

Docker socket access gives a process direct control over the Docker daemon, so the process can ask Docker to start, stop, and configure containers on the underlying host. In CI/CD and runner environments, that makes the socket a powerful boundary, because a job that can speak to the daemon can often influence the host far beyond the workload it was meant to run.

The key security property is not convenience, but authority. Docker socket access is effectively a management plane capability, so the risk depends on who can reach it, what they can submit to it, and whether the surrounding runner or host environment assumes that container boundaries are a security barrier. When that assumption is wrong, the socket becomes a path from pipeline execution to host administration.

Why Docker Socket Access Is So Dangerous

When a process can control the Docker daemon, it may be able to request privileged containers, mount sensitive host paths, expose host networking, or reuse the daemon to manipulate other workloads. That turns a seemingly isolated build or test step into a route for broader system control, especially when the runner itself has access to cloud credentials, deployment secrets, or internal networks.

The danger is amplified because Docker was designed to manage containers, not to act as a trust boundary for untrusted job code. If the socket is mounted into a container, the container can often direct the host daemon to do things the container could not do on its own, which collapses the separation between job-level execution and host-level authority.

Container Security Guide is the right parent concept for this risk, because Docker socket exposure is one of the classic ways container isolation fails in practice.

How Organisations Should Check Exposure

Exposure usually starts with runner inventory and deployment review. Teams need to know which build agents, developer workstations, and orchestration hosts mount /var/run/docker.sock, which jobs can reach it, and whether the socket is exposed directly or through a sidecar, helper service, or shared volume.

Internet exposure matters too. A local socket is not the same as a remote Docker API, but both create a privileged control surface if they are reachable from untrusted code or networks. Vendor and platform guidance should be checked alongside pipeline definitions, because a platform change can reintroduce socket access even when the application team believes it has been removed.

Docker and Docker Compose Security Guide provides the practical hardening context for daemon, socket, and docker-group risk.

NIST SP 800-190 Container Security is a useful external reference for assessing container runtime and host-risk exposure.

Remediation and Compensating Controls

The safest fix is to remove unnecessary socket access entirely. Where container builds or deployments truly require Docker, organisations should prefer isolated build services, rootless or user-namespaced runtimes, tightly scoped runner permissions, and job designs that do not depend on direct daemon control. In many CI/CD systems, the better pattern is to shift from daemon control to narrowly scoped pipeline actions.

When the socket cannot be removed immediately, compensating controls should reduce what a compromised job can do with it. That usually means stronger runner isolation, blocking access to the host filesystem, limiting outbound network paths, and ensuring that the job cannot inherit broader secrets or cloud credentials than it actually needs.

OWASP CI/CD Top 10 CICD-SEC-5 Insufficient PBAC Guide fits this problem well because socket access is often a symptom of overly broad pipeline authority.

T1611 Escape to Host Defensive Guide is the most relevant internal resource when a mounted socket is part of a container breakout path.

MITRE ATT&CK Enterprise Matrix helps map socket abuse to the broader attack chain, including privilege escalation and host escape.

Detection and Post-Compromise Review

Detection should focus on daemon activity that does not match normal build behaviour. That includes unexpected container creation, privilege escalation flags, unusual host mounts, access to sensitive files, image-building from inside jobs that should not build images, and exec or commit activity that appears inconsistent with the declared pipeline step.

After suspected abuse, review runner logs, Docker daemon logs, pipeline audit trails, and any artifacts created during the job. If the socket was exploitable, rotate any credentials, tokens, or keys that were reachable from the runner, and assume that host-resident secrets may have been exposed even if the initial alert appeared limited to a single build container.

MITRE ATT&CK T1612 Build Image on Host is useful for recognising daemon abuse patterns that often accompany socket exposure.

MITRE ATT&CK T1609 Container Administration Command helps distinguish normal orchestration from suspicious container-management activity.

Risk and Threat Considerations

Docker socket access is risky because it can erase the boundary between an untrusted job and the host that runs it. If an attacker or malicious pipeline step reaches the socket, the daemon may be used to create privileged containers, mount the host filesystem, or pivot into adjacent systems through the runner’s network and secret context.

Failure mechanism: The process does not need to break container isolation directly, it only needs control of the daemon interface that enforces container lifecycle actions on the host.

Impact: A single compromised workflow can become host compromise, with possible secret theft, persistence, lateral movement, and abuse of infrastructure that was assumed to be isolated.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-4 — Secure Configuration of Enterprise Assets and SoftwareDocker socket exposure is a hardening and secure-configuration issue.
Recommendation — Harden runners and hosts to remove unnecessary Docker socket exposure and misconfiguration.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeSocket access often grants broader authority than a job should hold.
IA-5 — Authenticator ManagementCompromise of socket-access jobs can expose tokens and keys that must be managed.
SI-4 — System MonitoringDaemon abuse requires monitoring for unusual container and host-control activity.
Recommendation — Restrict Docker daemon access to the minimum set of trusted services and operators. Rotate and manage credentials reachable from socket-enabled runners after suspected abuse. Monitor Docker daemon activity for privileged container creation, host mounts, and abnormal exec use.

Practitioner Guidance

Why practitioners should care: Treat socket access as a privileged control surface, not a convenience feature. If a job can talk to the daemon, it can often influence the host more deeply than the job owner expects.

Governance implication: Make explicit ownership decisions about which runners, teams, and pipeline classes are allowed to use Docker socket access, and review that approval as a standing exception rather than a default.

Practitioner takeaway: If a pipeline needs the Docker socket, justify the trust boundary in writing, because the socket is effectively part of the host administration plane.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org