CVE-2026-24125: @tinacms/graphql Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-2238-xc5r-v9hj
CVSS 6.3
CWE-22
Published
Advisory Summary

CVE-2026-24125 is a MODERATE (CVSS 6.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @tinacms/graphql libraries in the npm ecosystem. The issue involves @tinacms/graphql has a path traversal issue. Remediation is available by upgrading affected packages to version 2.1.2.

CVE-2026-24125 at a Glance

CVE Identifier CVE-2026-24125
GHSA Identifier GHSA-2238-xc5r-v9hj
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product @tinacms/graphql
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-24125

To remediate this vulnerability, upgrade all affected @tinacms/graphql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@tinacms/graphql fixed: 2.1.2
npm install @tinacms/graphql@2.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @tinacms/graphql

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-24125, inspect your project dependencies using npm:

npm ls @tinacms/graphql

Analyze the terminal output to locate any version of @tinacms/graphql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.2), your application is affected.

Note: The npm ls @tinacms/graphql command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In @tinacms/graphql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 1. **File Creation**: Create files outside the collection directory ```graphql createDocument( collection: "post" relativePath: "../../config/malicious.md" params: { post: { title: "malicious" } } ) ``` 2. **File Move/Rename**: Move existing files outside the collection ```graphql updateDocument( collection: "post" relativePath: "existing.md" params: { relativePath: "../../stolen.md" } ) ``` 3. **File Deletion**: Delete files outside the collection ```graphql deleteDocument( collection: "post" relativePath: "../../important-config.md" ) ``` 4. **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: 1. **Schema Validation**: Created/updated content must conform to the collection's GraphQL schema. Attackers cannot write arbitrary file content—the `params` argument is validated against the generated mutation types (e.g., `PostMutation`). 2. **Authentication Required**: Exploitation requires authenticated access with CMS editor permissions. Anonymous users cannot access GraphQL mutations. 3. **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: ```bash 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) " ```

CVE-2026-24125 Affected @tinacms/graphql Versions

1 component(s)
Fixed Versions:
2.1.2
Product / Package Ecosystem Affected Versions Fixed Version
@tinacms/graphql
npm
< 2.1.2
2.1.2

References

Frequently Asked Questions

What is CVE-2026-24125?
CVE-2026-24125 is a security vulnerability in @tinacms/graphql involving @tinacms/graphql has a Path Traversal issue under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which @tinacms/graphql versions are affected?
Affected versions include releases prior to 2.1.2 across affected packages: @tinacms/graphql.
What version fixes CVE-2026-24125?
Upgrading to 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @tinacms/graphql affected?
Yes, @tinacms/graphql is affected in releases prior to 2.1.2. Upgrade your dependency to 2.1.2 or later.
What is the CVSS score of CVE-2026-24125?
CVE-2026-24125 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2026-24125?
CVE-2026-24125 is classified under CWE-22: 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.).
How can I check npm dependencies for CVE-2026-24125?
Run the dependency tree command: 'npm ls @tinacms/graphql'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2238-xc5r-v9hj",
  "modified" : "2026-03-12T19:13:56Z",
  "published" : "2026-03-12T17:50:28Z",
  "aliases" : [ "CVE-2026-24125" ],
  "summary" : "@tinacms/graphql has a Path Traversal issue",
  "details" : "### Description\n\nTinaCMS 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.\n\nBecause `path.join()` does not prevent directory traversal, paths containing `../` sequences can escape the intended directory boundary.\n\n### Attack Vectors\n\n1. **File Creation**: Create files outside the collection directory\n   ```graphql\n   createDocument(\n     collection: \"post\"\n     relativePath: \"../../config/malicious.md\"\n     params: { post: { title: \"malicious\" } }\n   )\n   ```\n\n2. **File Move/Rename**: Move existing files outside the collection\n   ```graphql\n   updateDocument(\n     collection: \"post\"\n     relativePath: \"existing.md\"\n     params: { relativePath: \"../../stolen.md\" }\n   )\n   ```\n\n3. **File Deletion**: Delete files outside the collection\n   ```graphql\n   deleteDocument(\n     collection: \"post\"\n     relativePath: \"../../important-config.md\"\n   )\n   ```\n\n4. **Folder Creation**: Create folders outside the collection\n   ```graphql\n   createFolder(\n     collection: \"post\"\n     relativePath: \"../../malicious-folder\"\n   )\n   ```\n\n## Impact\n\nAn authenticated user with document mutation permissions can:\n\n- **Create content files** outside collection boundaries (subject to schema validation)\n- **Move or rename files** outside collection boundaries\n- **Delete content files** outside collection boundaries\n- **Read file contents** via document retrieval mutations\n\n## Mitigating Factors\n\nSeveral constraints limit the practical impact of this vulnerability:\n\n1. **Schema Validation**: Created/updated content must conform to the collection's GraphQL schema. Attackers cannot write arbitrary file content—the `params` argument is validated against the generated mutation types (e.g., `PostMutation`).\n\n2. **Authentication Required**: Exploitation requires authenticated access with CMS editor permissions. Anonymous users cannot access GraphQL mutations.\n\n3. **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.\n\n### What This Vulnerability Does NOT Allow\n\n- Writing arbitrary file content (content is schema-validated)\n- Silent/untracked file modifications (changes appear in git)\n- Unauthenticated access\n\n## Proof of Concept\n\nSee `packages/@tinacms/graphql/tests/path-traversal-security/index.test.ts` for automated tests demonstrating the vulnerability.\n\nManual reproduction:\n```bash\nnode -e \"\nconst path = require('path');\n\nconst collectionPath = 'content/posts';\nconst maliciousRelativePath = '../../OUTSIDE/poc.md';\n\nconst realPath = path.join(collectionPath, maliciousRelativePath);\nconsole.log('Resolved path:', realPath);\n// Output: OUTSIDE/poc.md (escaped content/posts)\n\"\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@tinacms/graphql"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/security/advisories/GHSA-2238-xc5r-v9hj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24125"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinacms/tinacms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T17:50:28Z",
    "nvd_published_at" : "2026-03-12T17:16:39Z"
  }
}