/

CVE-2026-34603

Severity:

HIGH RISK

(7.1)

Path Traversal / Insecure Filesystem Access in Tina CMS Dev

CVE-2026-34603

Analyzed

Vulnerability type

Category:

Path Traversal / Insecure Filesystem Access

CWE:

CWE-22, CWE-59

Impact:

Out-of-root File Read/Write/Delete via Media Endpoints

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Tina CMS's development media routes perform path-traversal checks on the raw request path but do not resolve symlinks or junctions before accessing the filesystem.

If an attacker can create or influence links under the configured media root, they may list, write, or delete files outside the intended media directory during development operations.

Affected context

This vulnerability occurs in Tina CMS instances using the @tinacms/cli development media routes where:

  • A media root directory is exposed for listing, upload, and deletion
  • Symlinks or junctions can exist under that media root (intentionally or via other tooling)
  • The server trusts that paths under the media root are safe without resolving their final targets

It mainly affects development environments but can become serious when those environments have access to sensitive project files, configuration, or secrets.

Exploit preconditions

  • Attack surface: HTTP endpoints exposed by the Tina dev media routes (e.g., media list, upload/write, delete).
  • Required access: Ability to interact with the dev server's media endpoints; in many setups this is available to anyone who can reach the dev instance.
  • Environment assumptions: At least one symlink or junction exists under the media root that points to a location outside that root (or the attacker can cause such a link to be created by some process).
  • Trigger point: Supplying a path such as pivot/written-from-media.txt that is syntactically inside the media directory but whose resolved target is outside due to following an existing link.
  • Why exploitation is possible: The path-traversal checks validate only the string representation of the path (e.g., ensuring it starts with the media root) and do not resolve symlink or junction targets before performing filesystem operations, allowing operations to escape the intended root.

Why this happens

The core issue is a mismatch between string-based path validation and the actual filesystem resolution of those paths.

The dev media routes attempt to prevent path traversal by checking that the requested path appears to stay within the media root, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory. However, these checks occur before resolving symlinks or junctions. When a link under the media root points outside that directory, the validated path is considered safe while its resolved target is not, causing the application to operate on out-of-root files.

This behavior is closely tied to CWE-59: Improper Link Resolution Before File Access, because the implementation fails to normalize and resolve symbolic/junction links prior to enforcing directory boundaries. In abstract terms, the code trusts the apparent path structure instead of the canonical, link-resolved path, enabling filesystem operations beyond the intended sandbox.

Potential impact

  • Read access to files outside the media root, potentially including source code, configuration, or other sensitive project files
  • Write access to arbitrary files reachable via symlinks/junctions, which could modify configuration, inject malicious content, or corrupt project data
  • Delete operations on files outside the media directory, possibly leading to data loss or denial of service for the development environment
  • Indirect assistance in other attacks (e.g., planting files that could be executed or consumed by other parts of the toolchain)

General mitigation guidance

Effective mitigation focuses on ensuring that filesystem boundaries are enforced on resolved paths rather than raw user input:

  • Resolve all requested paths to their canonical, absolute form (including symlink and junction resolution) before checking whether they reside under the intended media root.
  • Implement a strict "jail" pattern for media operations: after resolution, verify that the final path has the media root as its prefix and reject any operation that escapes this root.
  • Restrict or disallow symlinks and junctions under the media root in development environments where possible, or treat any detected link as unsafe for read/write/delete via HTTP.
  • Adopt least-privilege file permissions for the dev server process to minimize the blast radius if path validation fails.
  • Separate development media directories from sensitive project or infrastructure paths to reduce the impact of any sandbox escape.

How teams detect issues like this

Detection generally involves a combination of code-level and behavioral checks:

  • Static analysis and code review:
  • Look for filesystem operations that rely on user-controlled or API-controlled paths without canonicalization.
  • Flag patterns where only string-prefix checks (e.g., path.startsWith(mediaRoot)) are used to enforce directory boundaries.
  • Identify uses of symlink-supporting APIs without subsequent checks that confirm the resolved path is inside a trusted root.
  • Dynamic and runtime testing:
  • Add security tests that create symlinks/junctions under the media root pointing outside and verify that list, write, and delete operations are blocked.
  • Use integration tests in CI that simulate media API calls attempting out-of-root access via existing links.
  • Policy and tooling:
  • Configure linters or automated review tools to highlight direct filesystem access in HTTP route handlers and require explicit path normalization utilities.
  • Maintain internal guidelines that any directory "sandbox" must validate canonical, link-resolved paths rather than user-provided strings.

Sources

SourceLink
github.comgithub.com/tinacms/tinacms/commit/f124eabaca10dac9a4d765c9e4135813c4830955
github.comgithub.com/tinacms/tinacms/security/advisories/GHSA-g87c-r2jp-293w

Frequently asked

questions

It can be, depending on how the Tina dev server is exposed. If the dev media routes are reachable over the network and an attacker can interact with them, they may exploit this issue remotely, especially if they can influence or rely on existing symlinks/junctions under the media root.

The attacker needs HTTP access to the dev media endpoints and a context where symlinks or junctions under the media root point outside the directory. They do not necessarily need shell access, but local access or build tooling that creates such links can make exploitation easier.

The most robust fix is to resolve requested paths to their canonical, link-resolved form and then enforce that the final path is strictly within the configured media root before performing any list, write, or delete operation. Treat any path that resolves outside that root as invalid and reject it.

Design file access layers that always:

  • Normalize and canonicalize paths (including symlink resolution) before use.
  • Enforce directory boundaries using the resolved absolute path rather than user input strings.
  • Centralize path validation in a reusable utility and require its use in code review for any file or directory access driven by user-controlled data.
Find out what's already
exploitable in your codebase.