TinaCMS CLI has Arbitrary File Read via Disabled Vite Filesystem Restriction

Description

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

<img width="705" height="332" alt="image" src="https://github.com/user-attachments/assets/6fd0e1c7-a549-40c8-bc81-af9c343f52a0" />

curl http://localhost:4001/etc/hostname

<img width="631" height="41" alt="image" src="https://github.com/user-attachments/assets/bd103dc3-d4c3-4774-8007-b55de3fc2a9e" />
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

Basic information

Type
reviewed
Severity
medium
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2026-03-12 20:32:43 UTC
Updated
2026-03-12 20:32:44 UTC
GitHub reviewed
2026-03-12 20:32:43 UTC
NVD published
2026-03-12

EPSS Score

Score Percentile
3.42% 87.45%

CVSS Scores

Base score Version Severity Vector
6.2 3.1
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-552 Files or Directories Accessible to External Parties

Credits

  • alaeddine03 (reporter)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm @tinacms/cli < 2.1.8 2.1.8

References

cvelogic Threat Intelligence