Vulnerability GHSA-m48g-4wr2-j2h6

Medium Risk
MEDIUM RISK
CVSS Score: 6.2
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
7 months ago
March 12, 2026 at 08:32 PM UTC
TinaCMS CLI has Arbitrary File Read via Disabled Vite Filesystem Restriction
0.0.0-202231073 - 2.1.7
0.0.0-202231073 - 2.1.7

Summary

TinaCMS CLI has Arbitrary File Read via Disabled Vite Filesystem Restriction

Details

Summary

The TinaCMS CLI dev server configures Vite with server.fs.strict: false, which disables Vite's built-in filesystem access restriction. This allows any unauthenticated attacker who can reach the dev server to read arbitrary files on the host system

Details

When running tinacms dev, the CLI starts a Vite dev server configured in: packages/@tinacms/cli/src/next/vite/index.ts

server: {
  host: configManager.config?.build?.host ?? false,
  ...
  fs: {
    strict: false, // Disables Vite's filesystem access restriction
  },
},

TinaCMS middleware only intercepts specific route prefixes (/media/*, /graphql, /altair, /searchIndex). Any request to a path outside these routes falls through to Vite's default static file handler, which will serve the file directly from the absolute path on the filesystem. Additionally, the server enables permissive CORS (cors() with no origin restriction), which may further facilitate browser-based exploitation such as DNS rebinding attacks.

PoC

Prerequisites: TinaCMS CLI dev server running (default port 4001).

  • Read system files directly:
curl http://localhost:4001/etc/passwd
image
curl http://localhost:4001/etc/hostname
image Vite resolves and serves the absolute path directly from the filesystem.

Impact

Any developer running tinacms dev in an environment where the dev server port is reachable by an attacker. This includes:

  • Cloud IDEs (GitHub Codespaces, Gitpod) where ports are automatically forwarded and publicly accessible

  • Docker or VM setups with port forwarding configured

  • Misconfigured environments binding to 0.0.0.0 via the build.host config option

  • Systems targeted via DNS rebinding attacks, leveraging the unrestricted CORS policy

  • Local environments with malicious dependencies running on the same machine

An attacker who can reach port 4001 can:

  • Read any file readable by the server process (/etc/passwd, /etc/shadow, SSH private keys)

  • Exfiltrate environment variables and secrets via /proc/self/environ

  • Access cloud credentials and API keys from configuration files

Impacted packages

Timeline

Published
7 months ago
March 12, 2026 at 08:32 PM UTC
Fixed (2.1.8)
7 months ago
March 02, 2026 at 09:58 PM UTC
Last Modified
6 months ago
March 14, 2026 at 07:11 AM UTC