79779040

Date: 2025-09-30 11:36:08
Score: 0.5
Natty:
Report link

To see the issue, run this as a normal user that has permission to run docker commands (i.e. is member of the docker group):

docker run -it --rm -v/etc:/mnt/etc alpine:latest sh -c "apk add --no-cache bash && exec bash"
$ cat /mnt/etc/shadow

There are many ways of escalating privileges in docker, not just because containers by default run as root, but also the ability to set Linux capabilities (like SYS_ADMIN, NET_ADMIN, SYS_MODULE, etc), access to host namespaces and devices and more.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: 00prometheus