CVE-2026-24125: @tinacms/graphql has a Path Traversal issue
Description TinaCMS allows users to create, update, and delete content documents using relative file paths (relativePath, newRelativePath) via GraphQL mutations. Under certain conditions, these paths are combined with the collection path using path.join() without validating that the resolved path remains within the collection root directory.
Published Mar 12, 2026
Affected packages
@tinacms/graphql
- Ecosystem
- npm
- Affected
- <= 2.1.1
- Fixed in
- 2.1.2
- Check
npm ls @tinacms/graphql
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Description
TinaCMS allows users to create, update, and delete content documents using relative file paths (relativePath, newRelativePath) via GraphQL mutations. Under certain conditions, these paths are combined with the collection path using path.join() without validating that the resolved path remains within the collection root directory.
Because path.join() does not prevent directory traversal, paths containing ../ sequences can escape the intended directory boundary.
Attack Vectors
- File Creation: Create files outside the collection directory ``
graphql createDocument( collection: "post" relativePath: "../../config/malicious.md" params: { post: { title: "malicious" } } )``
- File Move/Rename: Move existing files outside the collection ``
graphql updateDocument( collection: "post" relativePath: "existing.md" params: { relativePath: "../../stolen.md" } )``
- File Deletion: Delete files outside the collection ``
graphql deleteDocument( collection: "post" relativePath: "../../important-config.md" )``
- Folder Creation: Create folders outside the collection ``
graphql createFolder( collection: "post" relativePath: "../../malicious-folder" )``
Impact
An authenticated user with document mutation permissions can:
- Create content files outside collection boundaries (subject to schema validation)
- Move or rename files outside collection boundaries
- Delete content files outside collection boundaries
- Read file contents via document retrieval mutations
Mitigating Factors
Several constraints limit the practical impact of this vulnerability:
- Schema Validation: Created/updated content must conform to the collection's GraphQL schema. Attackers cannot write arbitrary file content—the
paramsargument is validated against the generated mutation types (e.g.,PostMutation).
- Authentication Required: Exploitation requires authenticated access with CMS editor permissions. Anonymous users cannot access GraphQL mutations.
- Git Tracking: In typical deployments, all file operations are tracked in git (either via GitHub API for Tina Cloud/self-hosted with GitProvider, or local filesystem changes). Malicious changes are visible in version control and can be reverted.
What This Vulnerability Does NOT Allow
- Writing arbitrary file content (content is schema-validated)
- Silent/untracked file modifications (changes appear in git)
- Unauthenticated access
Proof of Concept
See packages/@tinacms/graphql/tests/path-traversal-security/index.test.ts for automated tests demonstrating the vulnerability.
Manual reproduction:
node -e "
const path = require('path');
const collectionPath = 'content/posts';
const maliciousRelativePath = '../../OUTSIDE/poc.md';
const realPath = path.join(collectionPath, maliciousRelativePath);
console.log('Resolved path:', realPath);
// Output: OUTSIDE/poc.md (escaped content/posts)
"Credited to pmins99.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-34603
@tinacms/graphql's Media Endpoints Can Escape the Media Root via Symlinks or Junctions
high7.1Apr 1, 2026CVE-2026-34604
@tinacms/graphql's `FilesystemBridge` Path Validation Can Be Bypassed via Symlinks or Junctions
high7.1Apr 1, 2026CVE-2026-33949
@tinacms/graphql has Path Traversal that leads to overwrite of arbitrary files
high8.1Mar 30, 2026CVE-2025-68278
tinacms is vulnerable to arbitrary code execution
high7.3Dec 18, 2025
