CVE-2026-44849: Github.com/portainer/portainer Portainer Has An Endpoint Security Vulnerability

CRITICAL
Advisory Identifier: GHSA-5fxq-qcf3-244w
CVSS 8.8
CWE-862
Published
Advisory Summary

CVE-2026-44849 is a CRITICAL (CVSS 8.8) portainer has an endpoint security vulnerability (CWE-862: Missing Authorization) affecting Github.com/portainer/portainer libraries in the Go ecosystem. The issue involves portainer has an endpoint security bypass via swarm service create/update. Remediation is available by upgrading affected packages to version 2.33.8, 2.39.2, 2.41.0.

CVE-2026-44849 at a Glance

CVE Identifier CVE-2026-44849
GHSA Identifier GHSA-5fxq-qcf3-244w
Severity CRITICAL
CVSS v3.1 Base Score 8.8
CWE Classification CWE-862: Missing Authorization
Affected Product Github.com/portainer/portainer
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-44849

To remediate this vulnerability, upgrade all affected Github.com/portainer/portainer dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/portainer/portainer fixed: 2.33.8
Upgrade github.com/portainer/portainer to 2.33.8
github.com/portainer/portainer fixed: 2.39.2
Upgrade github.com/portainer/portainer to 2.39.2
github.com/portainer/portainer fixed: 2.41.0
Upgrade github.com/portainer/portainer to 2.41.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/portainer/portainer

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-44849, inspect your project dependencies for Github.com/portainer/portainer:

inspect dependencies for github.com/portainer/portainer

Analyze the terminal output to locate any version of Github.com/portainer/portainer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.33.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Github.com/portainer/portainer, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Portainer enforces seven `EndpointSecuritySettings` restrictions that administrators configure to restrict the container configurations non-admin users can launch: **privileged mode**, **host PID namespace**, **device mapping**, **capabilities**, **sysctls**, **security-opt (Seccomp / AppArmor)**, and **bind mounts**. The vulnerability is exposed when a non-admin Portainer user (Standard User role, or any role granted endpoint-level access) has been given access to a Docker Swarm endpoint via Portainer RBAC. Admins and users without Swarm endpoint access are not affected. These restrictions are enforced on the standard container creation path, but several of them are not applied on the Docker Swarm service API: - `POST /services/create` — **1 of 7** checks applied. `CapabilityAdd`, `CapabilityDrop`, `Sysctls`, and `Privileges` (Seccomp / AppArmor) are not parsed from the request body and are forwarded to the Docker daemon without validation. - `POST /services/{id}/update` — **0 of 7** checks applied. The route dispatches to the generic `restrictedResourceOperation`, which validates RBAC ownership but does not inspect the request body or call `fetchEndpointSecuritySettings()`. The `EndpointSecuritySettings` checks apply when the administrator has configured any of `AllowContainerCapabilitiesForRegularUsers`, `AllowSysctlSettingForRegularUsers`, `AllowSecurityOptForRegularUsers`, or `AllowBindMountsForRegularUsers` to restrict standard users. A regular user with access to a Docker Swarm endpoint can: - Create a service with `CapabilityAdd: ["SYS_ADMIN", "NET_ADMIN", "SYS_PTRACE", …]` or `Privileges.Seccomp.Mode: "unconfined"`. - Create a benign service that passes ownership checks, then **update** it to add `CapabilityAdd: ["ALL"]` plus a bind mount of `/`, scale to one replica, and access the host filesystem from the running container (e.g. via `chroot /host`). In addition, the partial `Mounts[]` struct used by the bind-mount check inspects only the top-level `Type` field. A mount with `Type: "volume"` and `VolumeOptions.DriverConfig.Options: {type: "none", o: "bind", device: "<host path>"}` is forwarded to the Docker daemon unchanged; the local volume driver then materialises it as a bind-equivalent mount, bypassing `AllowBindMountsForRegularUsers`. The same field path is accepted by the standalone `POST /volumes/create` endpoint, which never had any `AllowBindMountsForRegularUsers` check on any branch. This undermines the administrator's configured security policy on Swarm-enabled endpoints. ## Affected Versions The vulnerability exists in every Portainer release with Docker Swarm support — the service-creation path has never checked `CapabilityAdd`, `CapabilityDrop`, `Sysctls`, or `Privileges`, and the service-update path has never performed any `EndpointSecuritySettings` validation. The `VolumeOptions.DriverConfig` field has never been parsed by the partial service struct on any branch, so the volume-driver-bind variant (service create/update and direct `/volumes/create`) shares the same affected range. Fixes are included in the next release of each supported branch: | Branch | First vulnerable | Fixed in | |---------------------|------------------|------------| | 2.33.x (LTS) | 2.33.0 | **2.33.8** | | 2.39.x (LTS) | 2.39.0 | **2.39.2** | | 2.40.x (STS) | 2.40.0 | **2.41.0** | Portainer LTS branches receive fixes for 6 months plus a 3-month overlap after the next LTS ships. STS releases are supported only until the next STS ships — the 2.40.x STS line ends with the 2.41.0 release. All releases **prior to 2.33.0 are end-of-life** and will not receive a fix; users on EOL versions should upgrade to a supported LTS branch. ## Workarounds Administrators who cannot immediately upgrade can reduce exposure with the following measures. None of these replaces the fix. - **Temporarily revoke Swarm endpoint access for non-admin users** via Portainer RBAC until the patched release is deployed. This eliminates the attack surface without service disruption for administrators. - **Segregate manager and worker nodes** with placement constraints so user workloads do not run on manager nodes. This limits the exposure of the Swarm control plane if the bypass is exploited against a worker. - **Block creation of local-driver volumes that use `type: none` / `o: bind`** on untrusted endpoints via a daemon-side allowlist. This closes the volume-driver-bind variant until the patched release is deployed. ## Affected Code ### Service creation — only `Mounts` inspected (1/7) ```go // api/http/proxy/factory/docker/services.go (pre-fix) type PartialService struct { TaskTemplate struct { ContainerSpec struct { Mounts []struct { Type string } } } } ``` `CapabilityAdd`, `CapabilityDrop`, `Sysctls`, and `Privileges` are not declared in the struct, so `json.Unmarshal` does not include them in the validated view. The request body is then forwarded to the Docker daemon without those fields being checked. ### Service update — no inspection (0/7) ```go // api/http/proxy/factory/docker/transport.go (pre-fix) if match, _ := path.Match("/services/*/*", requestPath); match { serviceID := path.Base(path.Dir(requestPath)) // ... no body inspection, no call to fetchEndpointSecuritySettings ... return transport.restrictedResourceOperation( request, serviceID, serviceID, portainer.ServiceResourceControl, false, ) } ``` `fetchEndpointSecuritySettings()` is called in three places in the codebase: container creation, service creation (bind-mount check only), and volume browsing. Service update is not among them. ### Bind-mount check — driver options ignored ```go // api/http/proxy/factory/docker/services.go (pre-fix — partial Mounts struct) Mounts []struct { Type string // only this field was read } ``` Because `VolumeOptions.DriverConfig.Options` is not declared in the partial struct, a mount of `Type: "volume"` passes the `Type != "bind"` check and is forwarded to the daemon. The local volume driver treats `{type: "none", o: "bind", device: "<host path>"}` as a bind-equivalent mount, so the check is bypassed. The fix extends the partial struct to carry `VolumeOptions.DriverConfig.Options map[string]string`, rejects service create/update requests where that map declares a bind-style driver, and adds a new `CheckVolumeBodyRestrictions` invocation on `POST /volumes/create` (which previously had no `AllowBindMountsForRegularUsers` check on any branch). ## Impact An authenticated, non-admin Portainer user with access to any Docker Swarm-enabled endpoint can configure a service with: - **Elevated Linux capabilities** including `CAP_SYS_ADMIN`, `CAP_NET_ADMIN`, `CAP_SYS_PTRACE`, or `ALL` — not restricted by `AllowContainerCapabilitiesForRegularUsers`. - **Disabled syscall filtering** via `Privileges.Seccomp.Mode: "unconfined"` — not restricted by `AllowSecurityOptForRegularUsers`. - **Disabled AppArmor confinement** via `Privileges.AppArmor.Mode: "disabled"` — not restricted by `AllowSecurityOptForRegularUsers`. - **Arbitrary sysctl values** inside the container namespace — not restricted by `AllowSysctlSettingForRegularUsers`. - **Bind mounts of any host path**, including `/`, `/var/run/docker.sock`, SSH keys, or Portainer's own database — not restricted by `AllowBindMountsForRegularUsers`. - **Bind-mount-equivalent host filesystem access via volume driver options** — a `Type: "volume"` mount whose `VolumeOptions.DriverConfig.Options` describe a local-driver bind, or a direct `POST /volumes/create` with the same payload, yields the same capability as a direct bind and is not restricted by `AllowBindMountsForRegularUsers`. In combination (e.g. `CapabilityAdd:["ALL"]` + bind mount of `/`), this gives a user access equivalent to root on the Swarm manager host from a restricted account, overriding the administrator's security policy. ## Timeline - `2026-03-12` — route2shell privately discloses the volume-driver local-bind variant. - `2026-04-05` — JohannesLks disclosure of the Swarm service create/update bypass - `2026-04-18` — Fix merged to develop. - `2026-04-29` — 2.41.0 released. - `2026-05-07` — 2.39.2-LTS and 2.33.8-LTS released. ## Credit - **route2shell** — disclosure of the volume-driver local-bind variant on both Swarm service creation/update and the standalone `/volumes/create` endpoint. - **JohannesLks** — independent disclosure of the Swarm service create/update bypass

CVE-2026-44849 Affected Github.com/portainer/portainer Versions

3 component(s)
Fixed Versions:
2.33.82.39.22.41.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/portainer/portainer
Go
≥ 2.33.0
< 2.33.8
2.33.8
github.com/portainer/portainer
Go
≥ 2.39.0
< 2.39.2
2.39.2
github.com/portainer/portainer
Go
≥ 2.40.0
< 2.41.0
2.41.0

References

Frequently Asked Questions

What is CVE-2026-44849?
CVE-2026-44849 is a security vulnerability in Github.com/portainer/portainer involving Portainer has an endpoint security bypass via Swarm service create/update under CWE-862: Missing Authorization.
Which Github.com/portainer/portainer versions are affected?
Affected versions include releases prior to 2.33.8, 2.39.2, 2.41.0 across affected packages: github.com/portainer/portainer.
What version fixes CVE-2026-44849?
Upgrading to 2.33.8, 2.39.2, 2.41.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/portainer/portainer affected?
Yes, github.com/portainer/portainer is affected in releases prior to 2.33.8, 2.39.2, 2.41.0. Upgrade your dependency to 2.33.8, 2.39.2, 2.41.0 or later.
What is the CVSS score of CVE-2026-44849?
CVE-2026-44849 has a CVSS v3.1 base score of 8.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-44849?
CVE-2026-44849 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Go dependencies for CVE-2026-44849?
Run the dependency tree command: 'inspect dependencies for github.com/portainer/portainer'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5fxq-qcf3-244w",
  "modified" : "2026-06-09T10:25:03Z",
  "published" : "2026-05-14T16:33:42Z",
  "aliases" : [ "CVE-2026-44849" ],
  "summary" : "Portainer has an endpoint security bypass via Swarm service create/update",
  "details" : "## Summary\n\nPortainer enforces seven `EndpointSecuritySettings` restrictions that administrators configure to restrict the container configurations non-admin users can launch: **privileged mode**, **host PID namespace**, **device mapping**, **capabilities**, **sysctls**, **security-opt (Seccomp / AppArmor)**, and **bind mounts**.\n\nThe vulnerability is exposed when a non-admin Portainer user (Standard User role, or any role granted endpoint-level access) has been given access to a Docker Swarm endpoint via Portainer RBAC. Admins and users without Swarm endpoint access are not affected.\n\nThese restrictions are enforced on the standard container creation path, but several of them are not applied on the Docker Swarm service API:\n\n- `POST /services/create` — **1 of 7** checks applied. `CapabilityAdd`, `CapabilityDrop`, `Sysctls`, and `Privileges` (Seccomp / AppArmor) are not parsed from the request body and are forwarded to the Docker daemon without validation.\n- `POST /services/{id}/update` — **0 of 7** checks applied. The route dispatches to the generic `restrictedResourceOperation`, which validates RBAC ownership but does not inspect the request body or call `fetchEndpointSecuritySettings()`.\n\nThe `EndpointSecuritySettings` checks apply when the administrator has configured any of `AllowContainerCapabilitiesForRegularUsers`, `AllowSysctlSettingForRegularUsers`, `AllowSecurityOptForRegularUsers`, or `AllowBindMountsForRegularUsers` to restrict standard users.\n\nA regular user with access to a Docker Swarm endpoint can:\n\n- Create a service with `CapabilityAdd: [\"SYS_ADMIN\", \"NET_ADMIN\", \"SYS_PTRACE\", …]` or `Privileges.Seccomp.Mode: \"unconfined\"`.\n- Create a benign service that passes ownership checks, then **update** it to add `CapabilityAdd: [\"ALL\"]` plus a bind mount of `/`, scale to one replica, and access the host filesystem from the running container (e.g. via `chroot /host`).\n\nIn addition, the partial `Mounts[]` struct used by the bind-mount check inspects only the top-level `Type` field. A mount with `Type: \"volume\"` and `VolumeOptions.DriverConfig.Options: {type: \"none\", o: \"bind\", device: \"<host path>\"}` is forwarded to the Docker daemon unchanged; the local volume driver then materialises it as a bind-equivalent mount, bypassing `AllowBindMountsForRegularUsers`. The same field path is accepted by the standalone `POST /volumes/create` endpoint, which never had any `AllowBindMountsForRegularUsers` check on any branch.\n\nThis undermines the administrator's configured security policy on Swarm-enabled endpoints.\n\n## Affected Versions\n\nThe vulnerability exists in every Portainer release with Docker Swarm support — the service-creation path has never checked `CapabilityAdd`, `CapabilityDrop`, `Sysctls`, or `Privileges`, and the service-update path has never performed any `EndpointSecuritySettings` validation. The `VolumeOptions.DriverConfig` field has never been parsed by the partial service struct on any branch, so the volume-driver-bind variant (service create/update and direct `/volumes/create`) shares the same affected range.\n\nFixes are included in the next release of each supported branch:\n\n| Branch              | First vulnerable | Fixed in   |\n|---------------------|------------------|------------|\n| 2.33.x (LTS)        | 2.33.0           | **2.33.8** |\n| 2.39.x (LTS)        | 2.39.0           | **2.39.2** |\n| 2.40.x (STS)        | 2.40.0           | **2.41.0** |\n\nPortainer LTS branches receive fixes for 6 months plus a 3-month overlap after the next LTS ships. STS releases are supported only until the next STS ships — the 2.40.x STS line ends with the 2.41.0 release. All releases **prior to 2.33.0 are end-of-life** and will not receive a fix; users on EOL versions should upgrade to a supported LTS branch.\n\n## Workarounds\n\nAdministrators who cannot immediately upgrade can reduce exposure with the following measures. None of these replaces the fix.\n\n- **Temporarily revoke Swarm endpoint access for non-admin users** via Portainer RBAC until the patched release is deployed. This eliminates the attack surface without service disruption for administrators.\n- **Segregate manager and worker nodes** with placement constraints so user workloads do not run on manager nodes. This limits the exposure of the Swarm control plane if the bypass is exploited against a worker.\n- **Block creation of local-driver volumes that use `type: none` / `o: bind`** on untrusted endpoints via a daemon-side allowlist. This closes the volume-driver-bind variant until the patched release is deployed.\n\n## Affected Code\n\n### Service creation — only `Mounts` inspected (1/7)\n\n```go\n// api/http/proxy/factory/docker/services.go (pre-fix)\n\ntype PartialService struct {\n    TaskTemplate struct {\n        ContainerSpec struct {\n            Mounts []struct {\n                Type string\n            }\n        }\n    }\n}\n```\n\n`CapabilityAdd`, `CapabilityDrop`, `Sysctls`, and `Privileges` are not declared in the struct, so `json.Unmarshal` does not include them in the validated view. The request body is then forwarded to the Docker daemon without those fields being checked.\n\n### Service update — no inspection (0/7)\n\n```go\n// api/http/proxy/factory/docker/transport.go (pre-fix)\n\nif match, _ := path.Match(\"/services/*/*\", requestPath); match {\n    serviceID := path.Base(path.Dir(requestPath))\n    // ... no body inspection, no call to fetchEndpointSecuritySettings ...\n    return transport.restrictedResourceOperation(\n        request, serviceID, serviceID,\n        portainer.ServiceResourceControl, false,\n    )\n}\n```\n\n`fetchEndpointSecuritySettings()` is called in three places in the codebase: container creation, service creation (bind-mount check only), and volume browsing. Service update is not among them.\n\n### Bind-mount check — driver options ignored\n\n```go\n// api/http/proxy/factory/docker/services.go (pre-fix — partial Mounts struct)\n\nMounts []struct {\n    Type string   // only this field was read\n}\n```\n\nBecause `VolumeOptions.DriverConfig.Options` is not declared in the partial struct, a mount of `Type: \"volume\"` passes the `Type != \"bind\"` check and is forwarded to the daemon. The local volume driver treats `{type: \"none\", o: \"bind\", device: \"<host path>\"}` as a bind-equivalent mount, so the check is bypassed.\n\nThe fix extends the partial struct to carry `VolumeOptions.DriverConfig.Options map[string]string`, rejects service create/update requests where that map declares a bind-style driver, and adds a new `CheckVolumeBodyRestrictions` invocation on `POST /volumes/create` (which previously had no `AllowBindMountsForRegularUsers` check on any branch).\n\n## Impact\n\nAn authenticated, non-admin Portainer user with access to any Docker Swarm-enabled endpoint can configure a service with:\n\n- **Elevated Linux capabilities** including `CAP_SYS_ADMIN`, `CAP_NET_ADMIN`, `CAP_SYS_PTRACE`, or `ALL` — not restricted by `AllowContainerCapabilitiesForRegularUsers`.\n- **Disabled syscall filtering** via `Privileges.Seccomp.Mode: \"unconfined\"` — not restricted by `AllowSecurityOptForRegularUsers`.\n- **Disabled AppArmor confinement** via `Privileges.AppArmor.Mode: \"disabled\"` — not restricted by `AllowSecurityOptForRegularUsers`.\n- **Arbitrary sysctl values** inside the container namespace — not restricted by `AllowSysctlSettingForRegularUsers`.\n- **Bind mounts of any host path**, including `/`, `/var/run/docker.sock`, SSH keys, or Portainer's own database — not restricted by `AllowBindMountsForRegularUsers`.\n- **Bind-mount-equivalent host filesystem access via volume driver options** — a `Type: \"volume\"` mount whose `VolumeOptions.DriverConfig.Options` describe a local-driver bind, or a direct `POST /volumes/create` with the same payload, yields the same capability as a direct bind and is not restricted by `AllowBindMountsForRegularUsers`.\n\nIn combination (e.g. `CapabilityAdd:[\"ALL\"]` + bind mount of `/`), this gives a user access equivalent to root on the Swarm manager host from a restricted account, overriding the administrator's security policy.\n\n## Timeline\n\n- `2026-03-12` — route2shell privately discloses the volume-driver local-bind variant.\n- `2026-04-05` — JohannesLks disclosure of the Swarm service create/update bypass\n- `2026-04-18`  — Fix merged to develop.\n- `2026-04-29` — 2.41.0 released.\n- `2026-05-07` — 2.39.2-LTS and 2.33.8-LTS released.\n## Credit\n\n- **route2shell** — disclosure of the volume-driver local-bind variant on both Swarm service creation/update and the standalone `/volumes/create` endpoint.\n- **JohannesLks** — independent disclosure of the Swarm service create/update bypass",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/portainer/portainer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.33.0"
      }, {
        "fixed" : "2.33.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/portainer/portainer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.39.0"
      }, {
        "fixed" : "2.39.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/portainer/portainer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.40.0"
      }, {
        "fixed" : "2.41.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/security/advisories/GHSA-5fxq-qcf3-244w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44849"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/portainer/portainer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/releases/tag/2.33.8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/releases/tag/2.39.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/portainer/portainer/releases/tag/2.41.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-14T16:33:42Z",
    "nvd_published_at" : "2026-05-28T22:16:58Z"
  }
}