# CVE-2026-134804: Portainer 2.39.0 before 2.39.9, 2.40.0 before 2.45.4, and 3.0.0 before 3.1.0 Authorization Bypass via WebSocket Attach and Exec

Source: https://aplosec.si/cve/CVE-2026-134804/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-134804

High 8.7 · Reported · Fixed in 2.39.9, 2.45.4, 3.1.0 · CWE-639 · Multiple credited contributors · Go

# Portainer 2.39.0 before 2.39.9, 2.40.0 before 2.45.4, and 3.0.0 before 3.1.0 Authorization Bypass via WebSocket Attach and Exec

CVE-2026-134804 · published 2026-11-22

In plain words: this type of bug lets a user see or change things that belong to someone else (broken access control). A fixed release is listed.

## Summary

CVE-2026-134804 affects Portainer (Go) >= 2.39.0, < 2.39.9; >= 2.40.0, < 2.45.4; >= 3.0.0, < 3.1.0: Authorization Bypass via WebSocket Attach and Exec (CWE-639). Fixed in 2.39.9, 2.45.4, 3.1.0. CVSS 4.0 base score 8.7 (High), assigned by VulnCheck. Published 2026-11-22 by VulnCheck. Credit: Zachariah Mithani (AploSec), Shahid-BugB, KutalVolkan, C-h4ck-0, zenniskayy2k4, tsug0d, d3do-23, danieltk76, rotemkama, xclow3n, tao0845, huynvi, k4z01.

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.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

Upgrade Portainer to the fixed release on your line: 2.39.9, 2.45.4, 3.1.0. Releases in the affected ranges (>= 2.39.0, < 2.39.9; >= 2.40.0, < 2.45.4; >= 3.0.0, < 3.1.0) are vulnerable. See the linked advisory for details on affected release lines.

## Timeline

- 2026-11-22 CVE published

## References

- [Referencehttps://github.com/portainer/portainer/security/advisories/GHSA-6c57-xm2f-23fg](https://github.com/portainer/portainer/security/advisories/GHSA-6c57-xm2f-23fg)

- [Releasehttps://github.com/portainer/portainer/releases/tag/2.45.4](https://github.com/portainer/portainer/releases/tag/2.45.4)

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/portainer-2.39.0-before-2.39.9-2.40.0-before-2.45.4-and-3.0.0-before-3.1.0-authorization-bypass-via-websocket-attach-and-exec](https://www.vulncheck.com/advisories/portainer-2.39.0-before-2.39.9-2.40.0-before-2.45.4-and-3.0.0-before-3.1.0-authorization-bypass-via-websocket-attach-and-exec)

- [Fix commithttps://github.com/portainer/portainer/commit/52f82e7c7eec08fa4b421cd423798b8966e13857](https://github.com/portainer/portainer/commit/52f82e7c7eec08fa4b421cd423798b8966e13857)

- [Fix commithttps://github.com/portainer/portainer/commit/d817b8762b8144ff5de2bf8d3201578d3d9d106f](https://github.com/portainer/portainer/commit/d817b8762b8144ff5de2bf8d3201578d3d9d106f)

- [Vulnerable codehttps://github.com/portainer/portainer/blob/2.45.3/api/http/handler/websocket/attach.go#L42-L92](https://github.com/portainer/portainer/blob/2.45.3/api/http/handler/websocket/attach.go#L42-L92)

- [Vulnerable codehttps://github.com/portainer/portainer/blob/2.45.3/api/http/handler/websocket/exec.go#L45-L96](https://github.com/portainer/portainer/blob/2.45.3/api/http/handler/websocket/exec.go#L45-L96)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-134804](https://www.cve.org/CVERecord?id=CVE-2026-134804)

- [NVD recordhttps://nvd.nist.gov/vuln/detail/CVE-2026-134804](https://nvd.nist.gov/vuln/detail/CVE-2026-134804)

**Severity:** High 8.7 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-134804)

**Package:** Portainer

**Ecosystem:** Go

**Affected:** >= 2.39.0, < 2.39.9; >= 2.40.0, < 2.45.4; >= 3.0.0, < 3.1.0

**Fixed:** 2.39.9, 2.45.4, 3.1.0

**Weakness:** CWE-639

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder · Shahid-BugB finder · KutalVolkan finder · C-h4ck-0 finder · zenniskayy2k4 finder · tsug0d finder · d3do-23 finder · danieltk76 finder · rotemkama finder · xclow3n finder · tao0845 finder · huynvi finder · k4z01 finder
