GHSA-5pmx-7r6r-wfqq: Github.com/kgateway dev/kgateway/v2 Kgateway Transformation Policy Template Can Vulnerability
MODERATEGHSA-5pmx-7r6r-wfqq is a MODERATE (CVSS 6.3) kgateway transformation policy template can vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Github.com/kgateway dev/kgateway/v2 libraries in the Go ecosystem. The issue involves kgateway transformation policy template can emit files from the container. Remediation is available by upgrading affected packages to version 2.0.5, 2.1.0.
GHSA-5pmx-7r6r-wfqq at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H).
How to Fix GHSA-5pmx-7r6r-wfqq
To remediate this vulnerability, upgrade all affected Github.com/kgateway dev/kgateway/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.
Upgrade github.com/kgateway-dev/kgateway/v2 to 2.0.5
Upgrade github.com/kgateway-dev/kgateway/v2 to 2.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/kgateway-dev/kgateway/v2
How to Check if You Are Affected
To determine whether your application is affected by GHSA-5pmx-7r6r-wfqq, inspect your project dependencies for Github.com/kgateway dev/kgateway/v2:
inspect dependencies for github.com/kgateway-dev/kgateway/v2
Analyze the terminal output to locate any version of Github.com/kgateway dev/kgateway/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.5), 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/kgateway dev/kgateway/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
GHSA-5pmx-7r6r-wfqq Affected Github.com/kgateway dev/kgateway/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/kgateway-dev/kgateway/v2
|
Go |
< 2.0.5
|
2.0.5
|
|
github.com/kgateway-dev/kgateway/v2
|
Go |
≥ 2.1.0-agw-cel-rbac
< 2.1.0
|
2.1.0
|
References
Frequently Asked Questions
What is GHSA-5pmx-7r6r-wfqq?
Which Github.com/kgateway dev/kgateway/v2 versions are affected?
What version fixes GHSA-5pmx-7r6r-wfqq?
Is github.com/kgateway-dev/kgateway/v2 affected?
What is the CVSS score of GHSA-5pmx-7r6r-wfqq?
What CWE is associated with GHSA-5pmx-7r6r-wfqq?
How can I check Go dependencies for GHSA-5pmx-7r6r-wfqq?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5pmx-7r6r-wfqq",
"modified" : "2025-11-17T21:37:07Z",
"published" : "2025-11-04T18:58:22Z",
"aliases" : [ ],
"summary" : "Kgateway transformation policy template can emit files from the container ",
"details" : "## Summary\n\nThe transformation policy template feature in Kgateway versions through 2.0.4 allows users with TrafficPolicy creation permissions to craft transformations that read and expose arbitrary files from the dataplane container filesystem.\n\n## Description\n\n### Impact\n\nUsers with permissions to create a TrafficPolicy can create a transformation that returns files from within the dataplane container. While no secrets are mounted to the container by default, users who mount custom volumes to the dataplane should be aware of potential data exposure through this vulnerability.\n\nThis could allow unauthorized access to:\n- Configuration files within the container\n- Custom mounted volumes and their contents\n- Any files accessible to the dataplane container process\n\nNote: Updated availability score to high, as under some configurations this can prevent xDS updates.\n\n### Patches\n\nUpgrade to version 2.0.5 or 2.1.0. These versions include an updated transformation filter in envoy-gloo that prevents file access through transformation templates.\n\n### Workarounds\n\nIf you are not using transformations, you can disallow TrafficPolicy creation or restrict transformation usage using a ValidatingAdmissionPolicy to prevent exploitation while preparing to upgrade.\n\n## References\n\n- Fix in 2.1.0: https://github.com/kgateway-dev/kgateway/pull/12528 (envoy-gloo v1.35.2-patch4)\n- Backport to 2.0.5: Included in https://github.com/kgateway-dev/kgateway/pull/12535 (envoy-gloo v1.34.6-patch3)\n- Envoy-gloo releases: https://github.com/solo-io/envoy-gloo/releases/tag/v1.35.2-patch4\n- Envoy-gloo releases: https://github.com/solo-io/envoy-gloo/releases/tag/v1.34.6-patch3\n\n\n## Credits\n\nKindly reported by @rikatz\n\n## For More Information\n\nIf you have any questions or comments about this advisory, please reach out in slack https://cloud-native.slack.com/archives/C080D3PJMS4",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/kgateway-dev/kgateway/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/kgateway-dev/kgateway/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1.0-agw-cel-rbac"
}, {
"fixed" : "2.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kgateway-dev/kgateway/security/advisories/GHSA-5pmx-7r6r-wfqq"
}, {
"type" : "WEB",
"url" : "https://github.com/kgateway-dev/kgateway/pull/12528"
}, {
"type" : "WEB",
"url" : "https://github.com/kgateway-dev/kgateway/pull/12535"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kgateway-dev/kgateway"
}, {
"type" : "WEB",
"url" : "https://github.com/solo-io/envoy-gloo/releases/tag/v1.34.6-patch3"
}, {
"type" : "WEB",
"url" : "https://github.com/solo-io/envoy-gloo/releases/tag/v1.35.2-patch4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-04T18:58:22Z",
"nvd_published_at" : null
}
}