Skip to main content

Image should not have 'root' user

SeverityExploitabilityProvidersCategories
HIGHHIGHDocker, KubernetesPERMISSION

Description

Containers most often do not need access to the host's root user. As there is no strong boundary between containers and other processes, the container root access could be used elsewhere.

Impact

Potential data exposureVisible in logsUser interaction requiredPrivileges required
TrueFalseFalseFalse

Escalation attacks. Root access to host. Running root privileged operation on the machine.

Remediation guidelines

Add a 'USER' statement to the Dockerfile with a value different than root or 0. If some commands need root privilege, the 'USER' can still be added at the end of the Dockerfile.

References

How can I help you ?