Skip to main content

Docker CVE-2026-44881

HIGH
Improper Link Resolution Before File Access (CWE-59)
2026-05-14 https://github.com/portainer/portainer GHSA-rpgq-m5fp-32wr
8.5
CVSS 4.0 · Vendor: https://github.com/portainer/portainer
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – May 28, 2026

Arbitrary file read in Portainer Community Edition allows authenticated low-privileged users to exfiltrate any file readable by the Portainer process — commonly root — by submitting a Git-backed stack whose docker-compose.yml is a symlink to a target like /etc/shadow or a Kubernetes service account token. The flaw stems from go-git v5 materializing Git symlink blobs as real OS symlinks during checkout combined with GetFileContent reading the entry point through os.ReadFile without resolving links, and is amplified by Portainer's scheduled stack auto-update, which lets a previously benign repository turn malicious after initial review. A fully validated proof-of-concept exists from the reporter (b-hermes), but there is no public exploit identified at time of analysis and no CISA KEV listing.

Earlier versions of this analysis (2)
v2 May 28, 2026 - 22:32 cvss changed CVSS 8.5

Arbitrary file read in Portainer 2.33.x, 2.39.x, and 2.40.x via Git symlink injection allows authenticated low-privileged users to retrieve any file readable by the Portainer process - typically root, including /etc/shadow, Kubernetes service account tokens, Docker secrets, and the portainer.db credential store. Exploitation requires only the default-granted ability to create a Git-backed stack pointing at an attacker-controlled repository whose docker-compose.yml is a symlink; auto-update extends the attack into a deferred-trigger primitive that bypasses initial repository review. No public exploit identified at time of analysis, but a fully validated proof-of-concept was provided privately to the vendor by researcher b-hermes.

v1 May 14, 2026 - 17:04

Arbitrary file read in Portainer allows authenticated users to leak sensitive files through Git symlink injection in stack deployments. When creating or updating a Git-backed stack, attackers embed symlinks pointing to system files (e.g., /etc/shadow, Kubernetes service account tokens, Docker secrets) in the repository; Portainer's go-git checkout writes these as OS symlinks, and the stack file endpoint follows them without validation, returning file contents in the HTTP response. The attack succeeds with default low-privilege permissions in Portainer CE and is amplified by auto-update, enabling time-delayed exploitation after initial approval. Vendor-released patches available in 2.33.8, 2.39.2, and 2.41.0. No active exploitation confirmed (not in CISA KEV); public exploit code exists (researcher-provided POC in GitHub advisory GHSA-rpgq-m5fp-32wr).

Affected Packages

go github.com/portainer/portainer fix: 2.33.8, 2.39.2, 2.41.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/portainer/portainer) PRIMARY 8.5 HIGH
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
SUSE CRITICAL

Primary rating from Vendor (https://github.com/portainer/portainer).

CVSS VectorVendor: https://github.com/portainer/portainer

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

4
Analysis Updated
May 28, 2026 - 22:33 vuln.today
v3 - CVSS changed
Analysis Updated
May 28, 2026 - 22:32 vuln.today
v2 - CVSS changed
CVSS changed
May 28, 2026 - 22:22 NVD
8.5 (HIGH)
CVE Published
May 14, 2026 - 16:23 nvd
HIGH

DescriptionCVE.org

Summary

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 - including docker-compose.yml, which Portainer treats as the stack entry point - 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 (for example /etc/passwd or a mounted Kubernetes service account token) 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.

The issue is amplified by Git-stack auto-update: an attacker can create a stack from a legitimate repository, pass initial review, and later push a commit that replaces docker-compose.yml with a symlink; the file read is then triggered on the next scheduled update cycle with no further interaction required.

Severity

High

Attack complexity is Low: the attacker needs only the ability to host a Git repository and the default-granted permission to create a Git-backed stack. Privilege required is Low in typical CE deployments, where non-admin users can manage their own stacks; administrators retain the same attack surface regardless of the setting. Impact on confidentiality is High - the Portainer process commonly runs as root (required for Docker socket access), so arbitrary file read includes /etc/shadow, Kubernetes service account tokens, Docker secrets, environment variables, and the Portainer database itself. Integrity and availability are not directly affected, but the leaked contents (service account tokens, registry credentials, database session keys) frequently enable onward compromise of the host and managed environments.

Affected Versions

The vulnerability exists in every Portainer release since the introduction of Git-based stack deployment support - Git-backed stacks have always performed an unrestricted go-git checkout and subsequently read the entry-point file through os.ReadFile without resolving symlinks.

Fixes are included in the following releases:

BranchFirst vulnerableFixed in
2.33.x (LTS)2.33.02.33.8
2.39.x (LTS)2.39.02.39.2
2.40.x (STS)all prior2.41.0

Portainer 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 by:

  • Restricting who can create Git-backed stacks. Disable Allow non-admin users to manage their stacks in environment settings so that only administrators can submit a Git repository URL. This reduces the attack to an administrator-only surface but does not remove it.
  • Avoiding untrusted repositories. Do not deploy Git-backed stacks from repositories you do not control or review, and do not grant stack-management rights to users who can supply an arbitrary repository URL.
  • Disabling auto-update on existing stacks. Auto-update re-clones the repository on a schedule, which allows a repository that was safe at creation time to later become malicious. Disabling auto-update removes the deferred-exploitation path.
  • Auditing existing stack working directories. Search project paths under /data/compose/ (or your configured data directory) for symlink entries - find /data/compose -type l - and treat any unexpected results as potential evidence of past exploitation.

None of these replace the fix.

Affected Code

The vulnerability is the combination of two primitives. go-git translates Git symlink entries into OS symlinks unconditionally (except .gitmodules):

go
// go-git v5 - Worktree.checkoutFileSymlink
func (w *Worktree) checkoutFileSymlink(f *object.File) (err error) {
    if strings.EqualFold(f.Name, gitmodulesFile) {
        return ErrGitModulesSymlink
    }
    // ... reads blob content as raw bytes ...
    err = w.Filesystem.Symlink(string(bytes), f.Name)
    return
}

Relative symlink targets (../../etc/passwd) are passed through to os.Symlink as-is and escape the worktree at OS resolution time. (Absolute targets are chrooted to the worktree by go-billy's ChrootHelper.Symlink and are not useful to the attacker.)

On the read side, GetFileContent in api/filesystem/filesystem.go applies lexical path containment but not symlink resolution:

go
func (service *Service) GetFileContent(trustedRoot, filePath string) ([]byte, error) {
    content, err := os.ReadFile(JoinPaths(trustedRoot, filePath))
    return content, err
}

JoinPaths prevents ../ traversal in the input string but does not call filepath.EvalSymlinks, so a symlink already written to the project path resolves through os.ReadFile to its ultimate target.

The fix wraps the go-billy filesystem used by the Git checkout with a custom noSymlinkFS type whose Symlink() method returns ErrSymlinkDetected, causing the clone to fail rather than write any OS symlink. Git trees that would otherwise produce a symlink entry are rejected at checkout time, closing the primary attack path. On the 2.33.x and 2.39.x branches the fix also hardens GetFileContent to call filepath.EvalSymlinks and verify the resolved path remains inside the trusted root, providing a second layer of defence against any future regression in Git-checkout handling.

Impact

  • Arbitrary file read as the Portainer process. Any file readable by the Portainer process - typically root in containerized deployments - can be returned through the stack file endpoint. Common targets include /etc/shadow, /root/.ssh/*, /proc/self/environ, and the Portainer BoltDB (portainer.db) which contains all user password hashes, API tokens, and agent credentials.
  • Kubernetes service account token exposure. Portainer running on Kubernetes has its cluster service account token mounted at /var/run/secrets/kubernetes.io/serviceaccount/token; reading it grants the attacker the Portainer pod's cluster API access.
  • Docker Swarm secret exposure. Secrets mounted into the Portainer container at /run/secrets/ (for example the initial admin password in Swarm deployments) are readable with the same mechanism.
  • Onward compromise. Leaked service tokens, registry credentials, and database contents frequently enable authenticated access to managed Docker/Kubernetes environments, container registries, and Portainer itself under other users' identities.
  • Deferred exploitation via auto-update. A repository that passes initial review at stack creation can be mutated afterwards; the malicious commit takes effect on the next auto-update cycle without user interaction.

Timeline

  • 2026-03-20: Reported via GitHub Security Advisory by b-hermes.
  • 2026-04-18: Fix merged to develop.
  • 2026-04-29: 2.41.0 released with fix.
  • 2026-05-07: 2.33.8, 2.39.2, released with fix.

Credit

  • b-hermes - identified the Git symlink injection primitive, traced the end-to-end chain through GetFileContent, and provided a fully validated proof-of-concept.

Executive ViewAI

Why It Matters

Portainer Community Edition suffers from a file read vulnerability (CVSS 8.5) with no public exploit identified at time of analysis, exploitable by low-privileged authenticated users to access sensitive system files including password hashes and service account tokens that could compromise container environments. The vulnerability's exploitation through Git symlinks combined with automatic scheduled stack updates creates a persistent attack surface even after initial repository review. Organizations using Portainer Community Edition must apply patches immediately to prevent credential theft and lateral movement within their container infrastructure.

Recommended Action

Within 24 hours: Identify all Portainer Community Edition deployments, document versions, and review audit logs for suspicious Git-backed stack operations. Within 7 days: Apply vendor-released patch to all instances; as interim mitigation, disable automatic Git stack updates and restrict repository sources to pre-approved internal repositories. Within 30 days: Validate all patched deployments and conduct forensic review of systems for indicators of credential exposure during the vulnerability window.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 82% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:go/github.com_portainer_portainer
pkg:go/github.com_portainer_portainer
pkg:go/github.com_portainer_portainer

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy