Mar 12, 2026·6 min read·4 visits
TinaCMS CLI versions prior to 2.1.8 explicitly disable Vite's strict filesystem checks, enabling an unauthenticated arbitrary file read vulnerability via the development server's /@fs/ endpoint.
The @tinacms/cli package prior to version 2.1.8 contains a medium-severity vulnerability that allows unauthenticated local or adjacent attackers to read arbitrary files from the host filesystem. This occurs due to an insecure Vite development server configuration that explicitly disables filesystem strict boundaries.
The @tinacms/cli package provides a command-line interface and development server for managing headless content in TinaCMS projects. Under the hood, this development environment utilizes Vite, a popular frontend tooling mechanism that handles asset serving and module resolution. A critical part of Vite's security model involves restricting the files it serves to the immediate project root, preventing unauthorized access to sensitive system files.
In versions of @tinacms/cli prior to 2.1.8, the configuration explicitly overrides this security mechanism. The vulnerability, tracked as CVE-2026-29066, manifests when the CLI initializes the Vite development server with the server.fs.strict option set to false. This configuration flaw exposes the underlying host's entire filesystem to unauthenticated read access.
By exploiting this misconfiguration, an attacker with network reachability to the development server port can extract sensitive data from the developer's machine. This includes environment variables, SSH keys, and cloud provider credentials stored outside the project workspace. The vulnerability represents a classic instance of CWE-552: Files or Directories Accessible to External Parties.
Vite incorporates a dedicated middleware known as @fs to serve files that reside outside the immediate project root. This feature exists primarily to support monorepo architectures where imported modules may exist in adjacent workspace directories. To secure this functionality, Vite defaults to server.fs.strict: true, which restricts the @fs middleware to a predefined list of allowed workspace directories.
The root cause of CVE-2026-29066 is the deliberate disabling of this strict mode within the TinaCMS CLI configuration. When @tinacms/cli instantiates the Vite server, it injects a configuration object containing the directive server.fs.strict: false. This setting disables the workspace boundary checks entirely, instructing the @fs middleware to serve any valid file path provided in the request URL.
When strict mode is disabled, the Vite server relies solely on the underlying operating system permissions of the running node process. Since development servers typically run under the context of the logged-in user, the server gains read access to the user's home directory, configuration files, and system-level configuration data. The application fails to validate whether the requested absolute path belongs to the expected project scope before returning the file content to the client.
The vulnerability stems directly from the hardcoded configuration object passed to the Vite server instantiation. The vulnerable implementation explicitly disables the filesystem boundary check without implementing alternative path validation or access controls.
// Vulnerable Vite configuration in @tinacms/cli < 2.1.8
const serverConfig = {
server: {
port: 4001,
fs: {
strict: false // Disables the workspace boundary security feature
}
}
}The remediation requires restoring the default security posture provided by the Vite framework. The patch implemented in version 2.1.8 removes the strict: false override, allowing Vite to enforce the workspace boundary and reject requests for files outside the allowed project directories.
// Patched Vite configuration in @tinacms/cli >= 2.1.8
const serverConfig = {
server: {
port: 4001,
fs: {
strict: true // Restores the workspace boundary security feature
}
}
}By enforcing strict mode, Vite automatically denies requests to absolute paths that attempt to traverse outside the defined workspace root. If a developer requires access to specific external directories for legitimate workflow reasons, the server.fs.allow array must be used to explicitly whitelist those paths instead of disabling the restriction globally.
Exploitation of CVE-2026-29066 requires unauthenticated access to the port hosting the TinaCMS development server, which defaults to 4001. The attacker must construct an HTTP GET request utilizing the /@fs/ route prefix followed by the absolute path of the targeted file.
On Unix-based operating systems, an attacker can extract system-level user information by requesting /etc/passwd. The following curl command demonstrates the proof-of-concept payload required to achieve this file read:
# Extract the system password file on Linux/macOS
curl http://localhost:4001/@fs/etc/passwdThe exploit methodology is identical on Windows environments, modifying only the absolute file path to match Windows drive letter conventions. An attacker targeting a Windows developer machine can read the win.ini file using the following request:
# Extract system configuration on Windows
curl http://localhost:4001/@fs/C:/Windows/win.iniWhile the CVSS vector designates the Attack Vector as Local (AV:L), real-world exploitation frequently occurs over the network. If the developer binds the server to 0.0.0.0 or operates on an untrusted local area network, any adjacent device can exploit the flaw. Furthermore, if a developer browses a malicious website while the dev server runs locally, an attacker can execute the file read via a DNS rebinding attack or cross-origin requests.
The impact of this vulnerability is isolated to the Confidentiality metric, resulting in a High severity rating for information disclosure. The Integrity and Availability of the system remain unaffected because the @fs middleware only provides read access. The vulnerability strictly maps to CWE-200, representing the exposure of sensitive information to unauthorized actors.
In a typical development environment, the consequences of arbitrary file read are severe due to the presence of unencrypted secrets. An attacker exploiting this flaw will prioritize extracting .env files located in the user's home directory or adjacent project folders. These files frequently contain database connection strings, API tokens, and cryptographic signing keys.
Beyond project-specific secrets, the vulnerability exposes global developer credentials. An attacker can request well-known paths such as ~/.aws/credentials, ~/.ssh/id_rsa, or ~/.kube/config. The successful extraction of these assets facilitates lateral movement into cloud environments, remote source code repositories, and production infrastructure.
The primary remediation for CVE-2026-29066 is updating the @tinacms/cli package to version 2.1.8 or later. This update restores the Vite development server's strict filesystem boundary checks. Developers should execute their respective package manager update commands to apply the patch.
If immediate patching is not technically feasible, developers must implement network-level mitigations. Ensure the development server strictly binds to the loopback interface (127.0.0.1 or localhost) rather than all network interfaces (0.0.0.0). This configuration prevents adjacent network devices from establishing a connection to the vulnerable port.
Security teams should audit the usage of @tinacms/cli within continuous integration pipelines and shared development servers. If the vulnerable server was historically exposed to a shared or untrusted network, organizations must proactively rotate all credentials, API keys, and access tokens stored on the affected host.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@tinacms/cli TinaCMS | < 2.1.8 | 2.1.8 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-552 / CWE-200 |
| Attack Vector | Local / Adjacent Network |
| CVSS Score | 6.2 |
| Impact | High Confidentiality (Arbitrary File Read) |
| Exploit Status | Proof of Concept (PoC) Available |
| KEV Status | Not Listed |
The software explicitly disables access restrictions, allowing an unauthorized actor to access sensitive files outside the intended web root.