CVE-2026-44885: Github.com/portainer/portainer Path Traversal Vulnerability
MODERATECVE-2026-44885 is a MODERATE (CVSS 5.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/portainer/portainer libraries in the Go ecosystem. The issue involves portainer has a path traversal in backup archive extraction that allows arbitrary file write. Remediation is available by upgrading affected packages to version 2.33.8.
CVE-2026-44885 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:L).
How to Fix CVE-2026-44885
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.
Upgrade github.com/portainer/portainer to 2.33.8
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-44885, 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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
CVE-2026-44885 Affected Github.com/portainer/portainer Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/portainer/portainer
|
Go |
≥ 2.33.0
< 2.33.8
|
2.33.8
|
References
Frequently Asked Questions
What is CVE-2026-44885?
Which Github.com/portainer/portainer versions are affected?
What version fixes CVE-2026-44885?
Is github.com/portainer/portainer affected?
What is the CVSS score of CVE-2026-44885?
What CWE is associated with CVE-2026-44885?
How can I check Go dependencies for CVE-2026-44885?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m8fg-67j7-cx4v",
"modified" : "2026-06-09T10:25:54Z",
"published" : "2026-05-14T16:23:03Z",
"aliases" : [ "CVE-2026-44885" ],
"summary" : "Portainer has a path traversal in backup archive extraction that allows arbitrary file write",
"details" : "### Summary\nPortainer's backup restore feature accepts a `.tar.gz` archive and extracts it to a target directory on the server. The extraction function (`ExtractTarGz` in `api/archive/targz.go`) constructed output paths using `filepath.Clean(filepath.Join(outputDirPath, header.Name))`. This combination does not prevent directory traversal — a tar entry named `../../etc/cron.d/evil` resolves to a path outside the extraction root, so a crafted archive can write files to arbitrary locations on the server filesystem.\n\n## Severity\n\n**Medium**\n\n**CWE-22** — Improper Limitation of a Pathname to a Restricted Directory\n('Path Traversal')\n\nExploitation requires administrator access to Portainer's backup restore endpoint. An administrator who is deceived into restoring a malicious archive, or whose credentials are compromised, can use this path to write files outside the Portainer data directory.\n\n## Affected Versions\n\nThe vulnerability exists in every Portainer release prior to 2.39.0 — `ExtractTarGz` has used `filepath.Clean(filepath.Join())` since it was introduced. The fix shipped with 2.39.0 (patched on `develop` before the 2.39 branch cut); 2.34.x–2.38.x STS releases are also affected but are end-of-life and will not receive a fix.\n\n| Branch | First vulnerable | Fixed in |\n|--------------|------------------|------------|\n| 2.33.x (LTS) | 2.33.0 | **2.33.8** |\n\nPortainer 2.39.0 and later are not affected — the fix was present from the initial 2.39.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 release.\n\n## Workarounds\n\nAdministrators who cannot immediately upgrade should:\n\n- **Only restore archives from trusted sources.** Do not restore archives received from untrusted parties or transmitted over unencrypted channels.\n- **Use backup encryption.** Portainer's optional backup encryption requires the correct passphrase to decrypt before extraction; an attacker without the passphrase cannot craft a valid encrypted archive.\n\nNeither of these replaces the fix.\n\n## Affected Code\n\n`ExtractTarGz` in `api/archive/targz.go` constructed output paths without safe containment:\n\n```go\n// api/archive/targz.go (pre-fix)\ncase tar.TypeReg:\n p := filepath.Clean(filepath.Join(outputDirPath, header.Name))\n```\nfilepath.Join resolves ../ components lexically and filepath.Clean normalises the result, but neither verifies the final path remains inside outputDirPath. The fix replaces this with filesystem.JoinPaths, which forces all path components to be relative to the trusted root:\n\n```go\n// api/archive/targz.go (post-fix)\ncase tar.TypeReg:\n p := filesystem.JoinPaths(outputDirPath, header.Name)\n```\n\n### Impact\n\n- Arbitrary file write at any path accessible to the Portainer process (typically root in containerised deployments), overriding filesystem boundaries of the data directory.\n- Potential host persistence by writing to cron directories, SSH authorised key files, or executable paths, depending on how the container is configured and what host paths are accessible.\n\nThe practical severity is reduced because exploitation requires administrative privileges within Portainer.\n\n## Timeline\n\n- 2026-02-16: Fix merged to develop ([#1875](https://github.com/portainer/portainer-suite/pull/1875)).\n- 2026-02-25: 2.39.0 released with fix.\n- 2026-05-07: 2.33.8 released with backport fix.\n\n### Credits\nReported by [Kolega](https://kolega.ai).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/portainer/portainer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.33.0"
}, {
"fixed" : "2.33.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/portainer/portainer/security/advisories/GHSA-m8fg-67j7-cx4v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44885"
}, {
"type" : "WEB",
"url" : "https://github.com/portainer/portainer-suite/pull/1875"
}, {
"type" : "WEB",
"url" : "https://github.com/portainer/portainer/commit/e02ae6b2fb69668d1cd7d07cb873dfcdd9cf1e42"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/portainer/portainer"
}, {
"type" : "WEB",
"url" : "https://github.com/portainer/portainer/releases/tag/2.33.8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-14T16:23:03Z",
"nvd_published_at" : "2026-05-28T22:16:59Z"
}
}