CVE-2025-54386: Github.com/traefik/traefik/v2 Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-q6gg-9f92-r9wg
CWE-30 CWE-22
Published
Advisory Summary

CVE-2025-54386 is a HIGH remote code execution vulnerability (CWE-30: Path Traversal: '\dir\..\filename') affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves traefik client plugin's path traversal vulnerability allows arbitrary file overwrite and remote code execution. Remediation is available by upgrading affected packages to version 2.11.28, 3.4.5, 3.5.0.

CVE-2025-54386 at a Glance

CVE Identifier CVE-2025-54386
GHSA Identifier GHSA-q6gg-9f92-r9wg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-30: Path Traversal: '\dir\..\filename'
Affected Product Github.com/traefik/traefik/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-54386

To remediate this vulnerability, upgrade all affected Github.com/traefik/traefik/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/traefik/traefik/v2 fixed: 2.11.28
Upgrade github.com/traefik/traefik/v2 to 2.11.28
github.com/traefik/traefik/v3 fixed: 3.4.5
Upgrade github.com/traefik/traefik/v3 to 3.4.5
github.com/traefik/traefik/v3 fixed: 3.5.0
Upgrade github.com/traefik/traefik/v3 to 3.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/traefik/traefik/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-54386, inspect your project dependencies for Github.com/traefik/traefik/v2:

inspect dependencies for github.com/traefik/traefik/v2

Analyze the terminal output to locate any version of Github.com/traefik/traefik/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.28), 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-30: Path Traversal: '\dir\..\filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\dir\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. In Github.com/traefik/traefik/v2, 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

### Summary A path traversal vulnerability was discovered in WASM Traefik’s plugin installation mechanism. By supplying a maliciously crafted ZIP archive containing file paths with `../` sequences, an attacker can overwrite arbitrary files on the system outside of the intended plugin directory. This can lead to remote code execution (RCE), privilege escalation, persistence, or denial of service. **✅ After investigation, it is confirmed that no plugins on the [Catalog](https://plugins.traefik.io/plugins) were affected. There is no known impact.** ### Details The vulnerability resides in the WASM plugin extraction logic, specifically in the `unzipFile` function (`/plugins/client.go`). The application constructs file paths during ZIP extraction using `filepath.Join(destDir, f.Name)` without validating or sanitizing `f.Name`. If the ZIP archive contains entries with `../`, the resulting path can escape the intended directory, allowing writes to arbitrary locations on the host filesystem. ### Attack Requirements There are several requirements needed to make this attack possible: - The Traefik server should be deployed with [plugins enabled](https://doc.traefik.io/traefik/plugins/) with a WASM plugin (yaegi plugins are not impacted). - The attacker should have write access to a remote plugin asset loaded by the Traefik server - The attacker should craft a malicious version of this plugin ### Warning As clearly stated in the [documentation](https://doc.traefik.io/traefik/plugins/), plugins are experimental in Traefik, and unsafe plugins could damage your infrastructure: > **Experimental Features** Plugins can change the behavior of Traefik in unforeseen ways. Exercise caution when adding new plugins to production Traefik instances. ### Impact **This vulnerability did not affect any plugin from the catalog. There is no known impact. Additionally, the catalog will also prevent any compromised plugin to be available across all Traefik versions.** This vulnerability can allow an attacker to perform arbitrary file write outside the intended plugin extraction directory by crafting a malicious ZIP archive that includes `../` (directory traversal) in file paths.

CVE-2025-54386 Affected Github.com/traefik/traefik/v2 Versions

3 component(s)
Fixed Versions:
2.11.283.4.53.5.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/traefik/traefik/v2
Go
< 2.11.28
2.11.28
github.com/traefik/traefik/v3
Go
< 3.4.5
3.4.5
github.com/traefik/traefik/v3
Go
≥ 3.5.0-rc1
< 3.5.0
3.5.0

References

Frequently Asked Questions

What is CVE-2025-54386?
CVE-2025-54386 is a security vulnerability in Github.com/traefik/traefik/v2 involving Traefik Client Plugin's Path Traversal Vulnerability Allows Arbitrary File Overwrite and Remote Code Execution under CWE-30: Path Traversal: '\dir\..\filename'.
Which Github.com/traefik/traefik/v2 versions are affected?
Affected versions include releases prior to 2.11.28, 3.4.5, 3.5.0 across affected packages: github.com/traefik/traefik/v2, github.com/traefik/traefik/v3.
What version fixes CVE-2025-54386?
Upgrading to 2.11.28, 3.4.5, 3.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/traefik/traefik/v2 affected?
Yes, github.com/traefik/traefik/v2 is affected in releases prior to 2.11.28. Upgrade your dependency to 2.11.28 or later.
Is github.com/traefik/traefik/v3 affected?
Yes, github.com/traefik/traefik/v3 is affected in releases prior to 3.4.5, 3.5.0. Upgrade your dependency to 3.4.5, 3.5.0 or later.
What CWE is associated with CVE-2025-54386?
CVE-2025-54386 is classified under CWE-30: Path Traversal: '\dir\..\filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\dir\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.).
How can I check Go dependencies for CVE-2025-54386?
Run the dependency tree command: 'inspect dependencies for github.com/traefik/traefik/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q6gg-9f92-r9wg",
  "modified" : "2025-11-27T09:02:51Z",
  "published" : "2025-08-01T18:08:15Z",
  "aliases" : [ "CVE-2025-54386" ],
  "summary" : "Traefik Client Plugin's Path Traversal Vulnerability Allows Arbitrary File Overwrite and Remote Code Execution",
  "details" : "### Summary\nA path traversal vulnerability was discovered in WASM Traefik’s plugin installation mechanism. By supplying a maliciously crafted ZIP archive containing file paths with `../` sequences, an attacker can overwrite arbitrary files on the system outside of the intended plugin directory. This can lead to remote code execution (RCE), privilege escalation, persistence, or denial of service.\n **✅ After investigation, it is confirmed that no plugins on the [Catalog](https://plugins.traefik.io/plugins) were affected. There is no known impact.**\n\n### Details\nThe vulnerability resides in the WASM plugin extraction logic, specifically in the `unzipFile` function (`/plugins/client.go`). The application constructs file paths during ZIP extraction using `filepath.Join(destDir, f.Name)` without validating or sanitizing `f.Name`. If the ZIP archive contains entries with `../`, the resulting path can escape the intended directory, allowing writes to arbitrary locations on the host filesystem.\n\n### Attack Requirements\nThere are several requirements needed to make this attack possible:\n- The Traefik server should be deployed with [plugins enabled](https://doc.traefik.io/traefik/plugins/) with a WASM plugin (yaegi plugins are not impacted).\n- The attacker should have write access to a remote plugin asset loaded by the Traefik server\n- The attacker should craft a malicious version of this plugin\n\n### Warning\nAs clearly stated in the [documentation](https://doc.traefik.io/traefik/plugins/), plugins are experimental in Traefik, and unsafe plugins could damage your infrastructure:\n\n> **Experimental Features**\nPlugins can change the behavior of Traefik in unforeseen ways. Exercise caution when adding new plugins to production Traefik instances.\n\n### Impact\n**This vulnerability did not affect any plugin from the catalog. There is no known impact. \nAdditionally, the catalog will also prevent any compromised plugin to be available across all Traefik versions.**\nThis vulnerability can allow an attacker to perform arbitrary file write outside the intended plugin extraction directory by crafting a malicious ZIP archive that includes `../` (directory traversal) in file paths.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.28"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.11.27"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.4.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.4.4"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0-rc1"
      }, {
        "fixed" : "3.5.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.0-rc2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/security/advisories/GHSA-q6gg-9f92-r9wg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54386"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/plugin-service/pull/71"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/plugin-service/pull/72"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/pull/11911"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/commit/5ef853a0c53068f69a6c229a5815a0dc6e0a8800"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/traefik/traefik"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/releases/tag/v2.11.28"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-30" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-08-01T18:08:15Z",
    "nvd_published_at" : "2025-08-02T00:15:25Z"
  }
}