Description
Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments. From 2.33.0 to before 2.33.8, 2.39.2, and 2.41.0, Portainer supports deploying stacks from Git repositories. When a Git-backed stack is created or updated, Portainer clones the repository using go-git v5, which translates Git blob entries with mode 0o120000 (symlink) into real OS symlinks on the host filesystem via os.Symlink. The only entry blocked from becoming a symlink is .gitmodules; every other path is created as a symlink without validation. Portainer's GET /api/stacks/{id}/file endpoint then reads the stack entry point with os.ReadFile, which follows OS symlinks transparently. A repository containing docker-compose.yml as a symlink to an arbitrary filesystem path causes the symlink target's contents to be returned verbatim in the HTTP response. Any authenticated user with rights to create or update a Git-backed stack — the default configuration in Portainer CE — can read arbitrary files accessible to the Portainer process. This vulnerability is fixed in 2.33.8, 2.39.2, and 2.41.0.
Published: 2026-05-28
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Portainer Community Edition, a lightweight service delivery platform for containerized applications, has a vulnerability that allows an attacker with appropriate authenticated permissions to read any file that the Portainer process can access. The flaw arises when a Git‑backed stack is created or updated; Portainer clones the repository and converts Git blob entries that are symlinks into OS symlinks without validating the target path. Because the GET /api/stacks/{id}/file endpoint subsequently reads the stack entry point, a malicious repository that defines docker‑compose.yml as a symlink to an arbitrary location will cause the contents of that target file to be returned in an HTTP response. This enables confidential information disclosure, exposing the weakness highlighted by CWE‑200 and CWE‑59. The damage is limited to confidentiality, as the attacker cannot tamper with data or execute code remotely through this flaw.

Affected Systems

The issue affects Portainer Community Edition versions that precede the patched releases. Vulnerable releases include 2.33.0 through 2.33.7, 2.39.0 through 2.39.1, and any pre‑2.41.0 version that has not yet been upgraded. The exploit requires an authenticated user who has rights to create or update a Git‑backed stack—permissions that are enabled by default in the standard configuration.

Risk and Exploitability

The vulnerability carries a CVSS score of 8.5, rating it as High severity, and although the EPSS score is not available, the absence of a KEV listing suggests no known widespread exploitation. Nevertheless, the attack vector is remote in the sense that it only requires legitimate access to the Portainer UI; once authenticated, the attacker can craft a malicious repository and trigger the vulnerability. Because the flaw allows reading arbitrary files on the host, the risk is significant for environments where the Portainer process runs with elevated privileges or where sensitive data resides on the same host.

Generated by OpenCVE AI on May 28, 2026 at 22:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Portainer Community Edition to version 2.33.8, 2.39.2, 2.41.0, or a newer release that contains the fix.
  • Restrict or remove the ability for users to create or update Git‑backed stacks, limiting access to only trusted personnel.
  • Disable automatic stack updates from Git repositories, or implement validation to block symlink targets before deployment.
  • If immediate upgrade is not feasible, ensure the Portainer process runs with the minimal required privileges and restrict the filesystem access of the Docker host.

Generated by OpenCVE AI on May 28, 2026 at 22:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-rpgq-m5fp-32wr Portainer Has an Arbitrary File Read via Git Symlink Injection in Stack Auto-Update
History

Fri, 29 May 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 28 May 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Portainer
Portainer portainer
Vendors & Products Portainer
Portainer portainer

Thu, 28 May 2026 21:30:00 +0000

Type Values Removed Values Added
Description Portainer Community Edition is a lightweight service delivery platform for containerized applications that can be used to manage Docker, Swarm, Kubernetes and ACI environments. From 2.33.0 to before 2.33.8, 2.39.2, and 2.41.0, Portainer supports deploying stacks from Git repositories. When a Git-backed stack is created or updated, Portainer clones the repository using go-git v5, which translates Git blob entries with mode 0o120000 (symlink) into real OS symlinks on the host filesystem via os.Symlink. The only entry blocked from becoming a symlink is .gitmodules; every other path is created as a symlink without validation. Portainer's GET /api/stacks/{id}/file endpoint then reads the stack entry point with os.ReadFile, which follows OS symlinks transparently. A repository containing docker-compose.yml as a symlink to an arbitrary filesystem path causes the symlink target's contents to be returned verbatim in the HTTP response. Any authenticated user with rights to create or update a Git-backed stack — the default configuration in Portainer CE — can read arbitrary files accessible to the Portainer process. This vulnerability is fixed in 2.33.8, 2.39.2, and 2.41.0.
Title Portainer: Arbitrary File Read via Git Symlink Injection in Stack Auto-Update
Weaknesses CWE-200
CWE-59
References
Metrics cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:H/SA:H'}


Subscriptions

Portainer Portainer
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-29T14:47:51.128Z

Reserved: 2026-05-07T21:50:33.544Z

Link: CVE-2026-44881

cve-icon Vulnrichment

Updated: 2026-05-29T14:47:37.784Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-28T22:16:59.247

Modified: 2026-05-29T15:06:44.207

Link: CVE-2026-44881

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-28T22:30:28Z

Weaknesses