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

HIGH
Advisory Identifier: GHSA-v9p7-gf3q-h779
CVSS 8.1
CWE-73 CWE-22
Published
Advisory Summary

CVE-2026-33949 is a HIGH (CVSS 8.1) path traversal vulnerability (CWE-73: External Control of File Name or Path) affecting @tinacms/graphql libraries in the npm ecosystem. The issue involves @tinacms/graphql has path traversal that leads to overwrite of arbitrary files. Remediation is available by upgrading affected packages to version 2.2.2.

CVE-2026-33949 at a Glance

CVE Identifier CVE-2026-33949
GHSA Identifier GHSA-v9p7-gf3q-h779
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-73: External Control of File Name or Path
Affected Product @tinacms/graphql
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

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:N/I:H/A:H).

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 None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-33949

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.2.2
npm install @tinacms/graphql@2.2.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-33949, 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.2.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-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. 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

### Summary A Path Traversal vulnerability in `@tinacms/graphql` allows unauthenticated users to write and overwrite arbitrary files within the project root. This is achieved by manipulating the `relativePath` parameter in GraphQL mutations. The impact includes the ability to replace critical server configuration files and potentially execute arbitrary commands by sabotaging build scripts. ### Details The vulnerability exists in the path validation logic within `@tinacms/graphql`. Specifically, the regex-based validation in `getValidatedPath` fails to recognize backslashes (`\`) as directory separators on non-Windows platforms (Mac/Linux). An attacker can provide a path like `x\..\..\..\package.json`, which bypasses the validation check but is subsequently treated as a traversal path during file I/O operations by the underlying `fs` modules and path normalization utilities. Incriminated code areas: - [packages/@tinacms/graphql/src/database/bridge/filesystem.ts](tinacms/packages/@tinacms/graphql/src/database/bridge/filesystem.ts): [assertWithinBase](tinacms/graphql/src/database/bridge/filesystem.ts#7-35) function. - [packages/@tinacms/graphql/src/resolver/index.ts](tinacms/packages/@tinacms/graphql/src/resolver/index.ts): `getValidatedPath` function. ### PoC 1. Start the TinaCMS development server. 2. Send a malicious GraphQL mutation to overwrite a project file (e.g., [package.json](tinacms/examples/tina-self-hosted-demo/package.json)): ```bash curl -X POST http://localhost:4001/graphql \ -H "Content-Type: application/json" \ -d '{"query": "mutation { updateDocument(collection: \"global\", relativePath: \"x\\\\..\\\\..\\\\..\\\\package.json\", params: { global: { header: { name: \"OVERWRITTEN\" } } }) { __typename } }"}' ``` 3. Observe that the root [package.json](tinacms/examples/tina-self-hosted-demo/package.json) has been replaced with the provided payload. <img width="1424" height="516" alt="2026-03-15_12-24-05 PM" src="https://github.com/user-attachments/assets/9fdf94ce-2183-4a24-9cd9-48f21deb9768" /> <img width="1387" height="774" alt="2026-03-15_12-27-33 PM" src="https://github.com/user-attachments/assets/676f083b-f934-4cf2-978b-bb2fabee0216" /> ### Impact This is an **Arbitrary File Write** vulnerability. Any unauthenticated user with network access to the GraphQL API can: - Overwrite critical server configuration files (e.g., [package.json](tinacms/examples/tina-self-hosted-demo/package.json), [tsconfig.json](tinacms/examples/tina-self-hosted-demo/tsconfig.json)). - Host malicious scripts in the `public/` directory for client-side attacks. - Perform **Arbitrary Code Execution** by modifying build scripts or server-side logic files that are subsequently executed by the environment. **Weaknesses:** - **CWE-22**: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') - **CWE-73**: External Control of File Name or Path

CVE-2026-33949 Affected @tinacms/graphql Versions

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

References

Frequently Asked Questions

What is CVE-2026-33949?
CVE-2026-33949 is a security vulnerability in @tinacms/graphql involving @tinacms/graphql has Path Traversal that leads to overwrite of arbitrary files under CWE-73: External Control of File Name or Path.
Which @tinacms/graphql versions are affected?
Affected versions include releases prior to 2.2.2 across affected packages: @tinacms/graphql.
What version fixes CVE-2026-33949?
Upgrading to 2.2.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.2.2. Upgrade your dependency to 2.2.2 or later.
What is the CVSS score of CVE-2026-33949?
CVE-2026-33949 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2026-33949?
CVE-2026-33949 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check npm dependencies for CVE-2026-33949?
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-v9p7-gf3q-h779",
  "modified" : "2026-04-06T16:43:56Z",
  "published" : "2026-03-30T17:07:53Z",
  "aliases" : [ "CVE-2026-33949" ],
  "summary" : "@tinacms/graphql has Path Traversal that leads to overwrite of arbitrary files",
  "details" : "### Summary\nA Path Traversal vulnerability in `@tinacms/graphql` allows unauthenticated users to write and overwrite arbitrary files within the project root. This is achieved by manipulating the `relativePath` parameter in GraphQL mutations. The impact includes the ability to replace critical server configuration files and potentially execute arbitrary commands by sabotaging build scripts.\n\n### Details\nThe vulnerability exists in the path validation logic within `@tinacms/graphql`. Specifically, the regex-based validation in `getValidatedPath` fails to recognize backslashes (`\\`) as directory separators on non-Windows platforms (Mac/Linux). An attacker can provide a path like `x\\..\\..\\..\\package.json`, which bypasses the validation check but is subsequently treated as a traversal path during file I/O operations by the underlying `fs` modules and path normalization utilities.\n\nIncriminated code areas:\n- [packages/@tinacms/graphql/src/database/bridge/filesystem.ts](tinacms/packages/@tinacms/graphql/src/database/bridge/filesystem.ts): [assertWithinBase](tinacms/graphql/src/database/bridge/filesystem.ts#7-35) function.\n- [packages/@tinacms/graphql/src/resolver/index.ts](tinacms/packages/@tinacms/graphql/src/resolver/index.ts): `getValidatedPath` function.\n\n### PoC\n1. Start the TinaCMS development server.\n2. Send a malicious GraphQL mutation to overwrite a project file (e.g., [package.json](tinacms/examples/tina-self-hosted-demo/package.json)):\n\n```bash\ncurl -X POST http://localhost:4001/graphql \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"query\": \"mutation { updateDocument(collection: \\\"global\\\", relativePath: \\\"x\\\\\\\\..\\\\\\\\..\\\\\\\\..\\\\\\\\package.json\\\", params: { global: { header: { name: \\\"OVERWRITTEN\\\" } } }) { __typename } }\"}'\n```\n\n3. Observe that the root [package.json](tinacms/examples/tina-self-hosted-demo/package.json) has been replaced with the provided payload.\n\n<img width=\"1424\" height=\"516\" alt=\"2026-03-15_12-24-05 PM\" src=\"https://github.com/user-attachments/assets/9fdf94ce-2183-4a24-9cd9-48f21deb9768\" />\n\n<img width=\"1387\" height=\"774\" alt=\"2026-03-15_12-27-33 PM\" src=\"https://github.com/user-attachments/assets/676f083b-f934-4cf2-978b-bb2fabee0216\" />\n\n### Impact\nThis is an **Arbitrary File Write** vulnerability. Any unauthenticated user with network access to the GraphQL API can:\n- Overwrite critical server configuration files (e.g., [package.json](tinacms/examples/tina-self-hosted-demo/package.json), [tsconfig.json](tinacms/examples/tina-self-hosted-demo/tsconfig.json)).\n- Host malicious scripts in the `public/` directory for client-side attacks.\n- Perform **Arbitrary Code Execution** by modifying build scripts or server-side logic files that are subsequently executed by the environment.\n\n\n\n**Weaknesses:**\n- **CWE-22**: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')\n- **CWE-73**: External Control of File Name or Path",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@tinacms/graphql"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/security/advisories/GHSA-v9p7-gf3q-h779"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33949"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinacms/tinacms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-73" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-30T17:07:53Z",
    "nvd_published_at" : "2026-04-01T17:28:39Z"
  }
}