Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

GHSA-m8fg-67j7-cx4v

MEDIUMFix: portainer/portainer-suite#1875

GHSA-m8fg-67j7-cx4v is a medium-severity (CVSS 5.5) Path Traversal vulnerability in github.com/portainer/portainer. O3 Security confirms whether GHSA-m8fg-67j7-cx4v is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Portainer has a path traversal in backup archive extraction that allows arbitrary file write

Also known asCVE-2026-44885GO-2026-5498
Published
May 14, 2026
Updated
Jul 7, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-m8fg-67j7-cx4v.

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk+0.36%
Lower risk than most CVEs46th percentile — riskier than 46% of all scored CVEsHighest risk
0.00%0.37%0.74%1.11%0.3%0.6%Jun 26Aug 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-m8fg-67j7-cx4v plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 358,265 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
🐹github.com/portainer/portainer

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Portainer'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.

Severity

Medium

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Exploitation 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.

Affected Versions

The 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.

BranchFirst vulnerableFixed in
2.33.x (LTS)2.33.02.33.8

Portainer 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.

Workarounds

Administrators who cannot immediately upgrade should:

  • Only restore archives from trusted sources. Do not restore archives received from untrusted parties or transmitted over unencrypted channels.
  • 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.

Neither of these replaces the fix.

Affected Code

ExtractTarGz in api/archive/targz.go constructed output paths without safe containment:

// api/archive/targz.go (pre-fix)
case tar.TypeReg:
    p := filepath.Clean(filepath.Join(outputDirPath, header.Name))

filepath.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:

// api/archive/targz.go (post-fix)
case tar.TypeReg:
    p := filesystem.JoinPaths(outputDirPath, header.Name)

Impact

  • Arbitrary file write at any path accessible to the Portainer process (typically root in containerised deployments), overriding filesystem boundaries of the data directory.
  • 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.

The practical severity is reduced because exploitation requires administrative privileges within Portainer.

Timeline

  • 2026-02-16: Fix merged to develop (#1875).
  • 2026-02-25: 2.39.0 released with fix.
  • 2026-05-07: 2.33.8 released with backport fix.

Credits

Reported by Kolega.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/portainer/portainer2.33.0&&< 2.33.82.33.8

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/portainer/portainer. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update github.com/portainer/portainer to 2.33.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-m8fg-67j7-cx4v is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-m8fg-67j7-cx4v is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-m8fg-67j7-cx4v. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary Portainer'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. ## Severity **Medium** **CWE-22** — Improper Limitation of a Pathname to a Res
O3 Security · Impact-Aware SCA

Is GHSA-m8fg-67j7-cx4v in your dependencies?

O3 detects GHSA-m8fg-67j7-cx4v across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-m8fg-67j7-cx4v: portainer Path… | O3 Security