Non-admin bind-mount restriction bypass via Docker local-driver volumes and automatic Git redeploy (incomplete fix of CVE-2026-44849 and CVE-2026-44850)
9.4
Critical
CVSS 4.0 base
What to do
If you run 2.40.0 to before 2.45.2, upgrade to 2.45.2 or later.
If you run 2.39.0 and later, no fixed version is listed in the advisory.
Anyone who can reach it over the network, with a low-privilege account and no user interaction, can read and change sensitive data and make it unavailable, and other systems are affected too.Read from the CVSS 4.0 vector
To exploit it
What it gets
Other systems
My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
github.com/portainer/portainer | go | >= 2.40.0, < 2.45.2 | 2.45.2 |
github.com/portainer/portainer | go | >= 2.39.0 | n/a |
Portainer lets administrators disable bind mounts for regular users through the AllowBindMountsForRegularUsers endpoint security setting. The container creation proxy enforces that setting, but it only understands one of the two ways Docker can create a bind mount. A regular user can smuggle a host bind mount past the check by describing it as a Type: "volume" mount whose local driver config requests type=bind, mounting any path from the Docker host into their container. This is the same class of bypass that was fixed for Swarm services but never carried over to plain container creation.
The container creation decorator parses an intentionally narrow view of the request body. In api/http/proxy/factory/docker/containers.go, the Mounts entries are reduced to a single field:
Mounts []struct { Type string `json:"Type"`} `json:"Mounts"`The bugmounts are parsed down to the Type field only
and the enforcement loop only rejects the mount when that field is the literal string bind:
if !securitySettings.AllowBindMountsForRegularUsers && len(partialContainer.HostConfig.Mounts) > 0 { for _, mount := range partialContainer.HostConfig.Mounts { if mount.Type == "bind" { return forbiddenResponse, ErrBindMountsForbiddenThe bugonly rejects mounts literally typed bind
VolumeOptions.DriverConfig.Options is never parsed, so a mount declared as Type: "volume" sails through. The sibling code for Swarm services, in api/http/proxy/factory/docker/services.go, already knows about this trick. Its partialServiceSpec parses the nested struct and checks it explicitly:
VolumeOptions *struct {
DriverConfig *struct {
Options map[string]string `json:"Options"`
} `json:"DriverConfig"`
} `json:"VolumeOptions"`
...
if mount.VolumeOptions != nil && mount.VolumeOptions.DriverConfig != nil {
if mount.VolumeOptions.DriverConfig.Options["type"] == "bind" {
The fix existed in one path and was simply absent in the other.
A regular Portainer user with endpoint access, on an endpoint where bind mounts are supposed to be forbidden, posts a container create request whose mount is Type: "volume" with DriverConfig.Options of type=bind, device=/, o=bind. Docker’s local volume driver turns that into a bind mount of the host root into the container. I confirmed this against v2.42.0: a container reading /hostroot/etc/shadow returned the real host file.
root:*:20535:0:99999:7:::
daemon:*:20535:0:99999:7:::
bin:*:20535:0:99999:7:::
From there the user has full read and write access to the host filesystem, including /root/.ssh, the Docker socket, and everything else, which is a complete escape of the restriction and of the container boundary. The affected range covers >= 2.33.0 through 2.42.0, every then current release.
Teach the container path the same thing the service path already knows. Extend the Mounts struct with the VolumeOptions.DriverConfig.Options map and reject any mount whose Options["type"] is bind, in addition to the existing Type == "bind" check. The same validation belongs in the Docker Compose stack path so stacks cannot reintroduce the bypass.
Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the portainer maintainers under coordinated disclosure and is credited as a reporter in GHSA-jmr9-98g4-2phv, published 2026-10-08.
All published findings: advisory index.