# CVE-2026-134804: Missing authorization in Portainer

> Standard Portainer users with shared environment access can hijack other users' containers via WebSocket attach/exec to gain root shells.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** No
- **Fix available:** No
- **Published:** 22 Nov 2026
- **Updated:** 23 Nov 2026
- **Also known as:** GHSA-6c57-xm2f-23fg, GHSA-88pc-g85c-cfjr

## What is CVE-2026-134804?

CVE-2026-134804 is a high-severity missing authorization vulnerability in Portainer, published on 22 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Portainer 2.39.0 before 2.39.9, 2.40.0 before 2.45.4, and 3.0.0 before 3.1.0 contains an authorization bypass vulnerability that allows Standard users to access other users' containers via the WebSocket attach and exec endpoints. Attackers with shared environment access can use leaked container or exec IDs to hijack sessions over /api/websocket/attach or /api/websocket/exec, gaining interactive root shells.

Weakness: CWE-639 (Authorization Bypass Through User-Controlled Key)

## Which versions are affected by CVE-2026-134804?

3 open source packages ship an affected version, including github.com/portainer/portainer.

An affected version is exposed as installed. No special setting or call is needed.


| Package | Ecosystem | PURL | Affected | Fixed in |
| --- | --- | --- | --- | --- |
| `github.com/portainer/portainer` | Go | `pkg:golang/github.com/portainer/portainer` | From 2.39.0 | 2.39.9 |
| `github.com/portainer/portainer` | Go | `pkg:golang/github.com/portainer/portainer` | From 2.40.0 | 2.45.4 |
| `github.com/portainer/portainer` | Go | `pkg:golang/github.com/portainer/portainer` | From 3.0.0 | 3.1.0 |

## How do I fix CVE-2026-134804?

Upgrade github.com/portainer/portainer to a fixed version for your release line: 3.1.0, 2.45.4 or 2.39.9.

## Is CVE-2026-134804 being exploited?

There is no known exploitation of CVE-2026-134804 in the wild and no public exploit code.

Public exploit code:

- Portainer <2.39.9/2.45.4/3.1.0: WebSocket attach/exec checks only environment permission — Standard user with foreign container/exec ID gets another user's shell. Verbatim guard from 52f82e7: foreign ID yields 200 OK on vuln, 403 on fixed (github_poc): https://github.com/googlesky/CVE-2026-134804

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-134804 and fix it if it is affected.

What it is: CVE-2026-134804 is a high-severity missing authorization vulnerability in Portainer, published on 22 Nov 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-134804 in the wild and no public exploit code.
Exposure: An affected version is exposed as installed. No special setting or call is needed.

Affected packages and fixed versions:
- github.com/portainer/portainer (Go): affected from 2.39.0; fixed in 2.39.9
- github.com/portainer/portainer (Go): affected from 2.40.0; fixed in 2.45.4
- github.com/portainer/portainer (Go): affected from 3.0.0; fixed in 3.1.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-134804/ (Markdown: https://insights.sbomify.com/CVE-2026-134804/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-134804
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-134804
- OSV: https://osv.dev/vulnerability/CVE-2026-134804

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-134804/
Summaries are generated and may contain mistakes; the official description above is the record.
