Skip to content

Fission: SanitizeFilePath lexical HasPrefix bypass permits sibling-directory escape

Low severity GitHub Reviewed Published Jun 8, 2026 in fission/fission • Updated Jul 28, 2026

Package

gomod github.com/fission/fission (Go)

Affected versions

<= 1.24.0

Patched versions

1.25.0

Description

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.

Affected

  • Project: github.com/fission/fission
  • Versions: all versions through v1.24.0 with SanitizeFilePath in the tree
  • Audited commit: 647c141
  • Component: pkg/utils/utils.go:SanitizeFilePath
  • Callers: pkg/builder/builder.go:157,164,208, pkg/fetcher/fetcher.go:296,311,450,496,565,571
  • Configuration: default; requires a sibling directory to the safe dir to exist on the filesystem

Fix section (paste into the Fix / Patches field)

Fixed in v1.25.0 by:

  • PR #3445 (commit 8298e33e) — migrate every SanitizeFilePath call site (fetcher: storePath /
    tmpPath / secretDir / configDir / rename + writeSecretOrConfigMap; builder: srcPkg / deployPkg path validation and srcPkg stat) to new pkg/utils/root.go helpers (RootJoin, RootStat, RootWriteFile, RootMkdirAll,
    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.
  • PR #3446 (commit 5aac6f0b) — delete the deprecated SanitizeFilePath itself once no callers
    remained. The vulnerable function no longer exists in the tree.

References

@sanketsudake sanketsudake published to fission/fission Jun 8, 2026
Published by the National Vulnerability Database Jun 10, 2026
Published to the GitHub Advisory Database Jul 28, 2026
Reviewed Jul 28, 2026
Last updated Jul 28, 2026

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(2nd percentile)

Weaknesses

Improper Resolution of Path Equivalence

The product is vulnerable to file system contents disclosure through path equivalence. Path equivalence involves the use of special characters in file and directory names. The associated manipulations are intended to generate multiple names for the same object. Learn more on MITRE.

CVE ID

CVE-2026-50568

GHSA ID

GHSA-r5jh-q2mw-gcx4

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.