{"id":"CVE-2026-50568","aliases":["CVE-2026-50568","GHSA-r5jh-q2mw-gcx4","GO-2026-6130"],"related":[],"kind":"vulnerability","state":"published","title":"Fission: SanitizeFilePath lexical HasPrefix bypass permits sibling-directory escape","summary":"Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. Prior to version 1.25.0, SanitizeFilePath in pkg/utils/utils.go validated that a path stayed under a safe directory by calling strings.HasPrefix(path, safedir). This is a lexical check, not a directory boundary check: /packages-extra/evil starts with /packages, so it passed. The function did not enforce a path-separator boundary, so any sibling directory whose name began with the safe-directory string was accepted. Callers included the builder's Clean handler (pkg/builder/builder.go:208) and the fetcher's Fetch / Upload handlers (pkg/fetcher/fetcher.go). A tenant who could pre-create or control a sibling directory under the fetcher / builder's shared volume could induce a write or read outside the intended safe directory. This issue has been patched in version 1.25.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. Prior to version 1.25.0, SanitizeFilePath in pkg/utils/utils.go validated that a path stayed under a safe directory by calling strings.HasPrefix(path, safedir). This is a lexical check, not a directory boundary check: /packages-extra/evil starts with /packages, so it passed. The function did not enforce a path-separator boundary, so any sibling directory whose name began with the safe-directory string was accepted. Callers included the builder's Clean handler (pkg/builder/builder.go:208) and the fetcher's Fetch / Upload handlers (pkg/fetcher/fetcher.go). A tenant who could pre-create or control a sibling directory under the fetcher / builder's shared volume could induce a write or read outside the intended safe directory. This issue has been patched in version 1.25.0.","source":"cvelist"},{"lang":"en","text":"`SanitizeFilePath` in `pkg/utils/utils.go` validated that a path stayed under a safe directory by calling `strings.HasPrefix(path, safedir)`. This is a lexical check, not a directory boundary check: `/packages-extra/evil` starts with\n`/packages`, so it passed. The function did not enforce a path-separator boundary, so any sibling directory whose name began with the safe-directory string was accepted.\n\nCallers included the builder's `Clean` handler (`pkg/builder/builder.go:208`) and the fetcher's `Fetch` / `Upload` handlers (`pkg/fetcher/fetcher.go`). A tenant who could pre-create or control a sibling directory under the fetcher /\nbuilder's shared volume could induce a write or read outside the intended safe directory.\n\n### Affected\n\n- Project: `github.com/fission/fission`\n- Versions: all versions through v1.24.0 with `SanitizeFilePath` in the tree\n- Audited commit: `647c141`\n- Component: `pkg/utils/utils.go:SanitizeFilePath`\n- Callers: `pkg/builder/builder.go:157,164,208`, `pkg/fetcher/fetcher.go:296,311,450,496,565,571`\n- Configuration: default; requires a sibling directory to the safe dir to exist on the filesystem\n\n\nFix section (paste into the Fix / Patches field)\n\nFixed in [v1.25.0](https://github.com/fission/fission/releases/tag/v1.25.0) by:\n\n- [PR #3445](https://github.com/fission/fission/pull/3445) (commit [`8298e33e`](https://github.com/fission/fission/commit/8298e33ea7457702f893eae11077987cf905edb4)) — migrate every `SanitizeFilePath` call site (fetcher: `storePath` /\n`tmpPath` / `secretDir` / `configDir` / rename + `writeSecretOrConfigMap`; builder: `srcPkg` / `deployPkg` path validation and `srcPkg` stat) to new `pkg/utils/root.go` helpers (`RootJoin`, `RootStat`, `RootWriteFile`, `RootMkdirAll`,\n`RootRename`) that operate through `os.Root`. `os.Root` enforces directory confinement in the kernel and is recognized by CodeQL `go/path-injection` as a traversal barrier.\n- [PR #3446](https://github.com/fission/fission/pull/3446) (commit [`5aac6f0b`](https://github.com/fission/fission/commit/5aac6f0bcdf840e28f3f06c846ca7ae1866b3957)) — delete the deprecated `SanitizeFilePath` itself once no callers\nremained. The vulnerable function no longer exists in the tree.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Fission: SanitizeFilePath lexical HasPrefix bypass permits sibling-directory escape in github.com/fission/fission","format":"markdown","source":"go"}],"published":"2026-06-10T17:31:49.917Z","modified":"2026-08-18T15:11:05.322Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","score":3.6,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","score":3.6,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N","score":3.6,"rating":"LOW"}],"cwes":["CWE-41"],"affected":[{"ranges":[{"version":"< 1.25.0","status":"affected"}],"vendor":"fission","product":"fission","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.25.0"}],"ecosystem":"Go","package":"github.com/fission/fission","purl":"pkg:golang/github.com/fission/fission","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.25.0"}],"ecosystem":"Go","package":"github.com/fission/fission","purl":"pkg:golang/github.com/fission/fission","source":"go"}],"references":[{"url":"https://github.com/fission/fission/security/advisories/GHSA-r5jh-q2mw-gcx4","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/fission/fission/pull/3445","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/fission/fission/pull/3446","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/fission/fission/releases/tag/v1.25.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50568","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/fission/fission/commit/5aac6f0bcdf840e28f3f06c846ca7ae1866b3957","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/fission/fission/commit/8298e33ea7457702f893eae11077987cf905edb4","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/fission/fission","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-11T13:59:24.283Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-50568","url":"https://www.cve.org/CVERecord?id=CVE-2026-50568","licence":"CVE Terms of Use","modified":"2026-06-11T13:59:45.267Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r5jh-q2mw-gcx4","url":"https://github.com/advisories/GHSA-r5jh-q2mw-gcx4","licence":"CC-BY-4.0","modified":"2026-08-18T15:11:05.322Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6130","url":"https://pkg.go.dev/vuln/GO-2026-6130","licence":"CC-BY-4.0","modified":"2026-08-18T15:00:22.717Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-50568","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50568","licence":"Public domain","modified":"2026-06-17T10:57:43.250Z"}],"updatedAt":"2026-11-25T22:59:24.356Z","epss":{"score":0.00115,"percentile":0.01699,"date":"2026-12-01T12:00:22.000Z"}}