Skip to main content
Menu
Advisories

Arbitrary host file read via file:// server reference

GHSA-6PQ5-P7FC-7XHQPublished Updated GitHub

Description

A server reference beginning with file:// is read from an arbitrary absolute host path with no confinement to a project/working directory.

Details

ResolveServersFromString routes a file:// value to ResolveFile after stripping the prefix, and ResolveFile calls os.ReadFile on that path verbatim (workingset.go) with no base-directory confinement. An absolute path anywhere on the host is read; only a later content/extension check limits whether the file is accepted as a server definition.

Impact

A file:// server reference causes the gateway to read an arbitrary absolute path on the host as a candidate server definition; confidentiality impact is bounded by what is reflected back through the later validation.

Preconditions

  • A file:// server reference is processed (e.g. via profile/server management); whether untrusted imported content can reach this path depends on deployment.

Workarounds

  • Only accept server references from trusted sources.
  • Run the gateway as a low-privilege user without read access to sensitive host files.

References

Affected versions

References

GitHub · docker/mcp-gateway