Vulnerabilities in pkg:npm/@tinacms/graphql

PACKAGE
Advisory Identifier: GHSA-g9c2-gf25-3x67
Advisory Summary

CVE-2026-34604 is a HIGH (CVSS 7.1) @tinacms/graphql's `filesystembridge` path validation can vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting @tinacms/graphql libraries in the npm ecosystem. The issue involves @tinacms/graphql's `filesystembridge` path validation can be bypassed via symlinks or junctions. Remediation is available by upgrading affected packages to version 2.2.2.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@tinacms/graphql

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@tinacms/graphql. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-g9c2-gf25-3x67 CVE-2026-34604 HIGH @tinacms/graphql's `FilesystemBridge` Path Validation Can Be Bypassed via Symlinks or Junctions
GHSA-g87c-r2jp-293w CVE-2026-34603 HIGH @tinacms/graphql's Media Endpoints Can Escape the Media Root via Symlinks or Junctions
GHSA-v9p7-gf3q-h779 CVE-2026-33949 HIGH @tinacms/graphql has Path Traversal that leads to overwrite of arbitrary files
GHSA-2238-xc5r-v9hj CVE-2026-24125 MODERATE @tinacms/graphql has a Path Traversal issue
GHSA-529f-9qwm-9628 CVE-2025-68278 HIGH tinacms is vulnerable to arbitrary code execution

CVE-2026-34604 at a Glance

CVE Identifier CVE-2026-34604
GHSA Identifier GHSA-g9c2-gf25-3x67
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product @tinacms/graphql
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.1

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

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

How to Fix CVE-2026-34604

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-34604, 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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. 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 `@tinacms/graphql` uses string-based path containment checks in `FilesystemBridge`: - `path.resolve(path.join(baseDir, filepath))` - `startsWith(resolvedBase + path.sep)` That blocks plain `../` traversal, but it does not resolve symlink or junction targets. If a symlink/junction already exists under the allowed content root, a path like `content/posts/pivot/owned.md` is still considered "inside" the base even though the real filesystem target can be outside it. As a result, `FilesystemBridge.get()`, `put()`, `delete()`, and `glob()` can operate on files outside the intended root. ## Details The current bridge validation is: ```ts function assertWithinBase(filepath: string, baseDir: string): string { const resolvedBase = path.resolve(baseDir); const resolved = path.resolve(path.join(baseDir, filepath)); if ( resolved !== resolvedBase && !resolved.startsWith(resolvedBase + path.sep) ) { throw new Error( `Path traversal detected: "${filepath}" escapes the base directory` ); } return resolved; } ``` But the bridge then performs real filesystem I/O on the resulting path: ```ts public async get(filepath: string) { const resolved = assertWithinBase(filepath, this.outputPath); return (await fs.readFile(resolved)).toString(); } public async put(filepath: string, data: string, basePathOverride?: string) { const basePath = basePathOverride || this.outputPath; const resolved = assertWithinBase(filepath, basePath); await fs.outputFile(resolved, data); } public async delete(filepath: string) { const resolved = assertWithinBase(filepath, this.outputPath); await fs.remove(resolved); } ``` This is a classic realpath gap: 1. validation checks the lexical path string 2. the filesystem follows the link target during I/O 3. the actual target can be outside the intended root This is reachable from Tina's GraphQL/local database flow. The resolver builds a validated path from user-controlled `relativePath`, but that validation is also string-based: ```ts const realPath = path.join(collection.path, relativePath); this.validatePath(realPath, collection, relativePath); ``` Database write and delete operations then call the bridge: ```ts await this.bridge.put(normalizedPath, stringifiedFile); ... await this.bridge.delete(normalizedPath); ``` ## Local Reproduction This was verified llocally with a real junction on Windows, which exercises the same failure mode as a symlink on Unix-like systems. Test layout: - content root: `D:\bugcrowd\tinacms\temp\junction-repro4` - allowed collection path: `content/posts` - junction inside collection: `content/posts/pivot -> D:\bugcrowd\tinacms\temp\junction-repro4\outside` - file outside content root: `outside\secret.txt` Tina's current path-validation logic was applied and used to perform bridge-style read/write operations through the junction. Observed result: ```json { "graphqlBridge": { "collectionPath": "content/posts", "requestedRelativePath": "pivot/owned.md", "validatedRealPath": "content\\posts\\pivot\\owned.md", "bridgeResolvedPath": "D:\\bugcrowd\\tinacms\\temp\\junction-repro4\\content\\posts\\pivot\\owned.md", "bridgeRead": "TOP_SECRET_FROM_OUTSIDE\\r\\n", "outsideGraphqlWriteExists": true, "outsideGraphqlWriteContents": "GRAPHQL_ESCAPE" } } ``` That is the critical point: - the path was accepted as inside `content/posts` - the bridge read `outside\secret.txt` - the bridge wrote `outside\owned.md` So the current containment check does not actually constrain filesystem access to the configured content root once a link exists inside that tree. ## Impact - **Arbitrary file read/write outside the configured content root** - **Potential delete outside the configured content root** via the same `assertWithinBase()` gap in `delete()` - **Breaks the assumptions of the recent path-traversal fixes** because only lexical traversal is blocked - **Practical attack chains** where the content tree contains a committed symlink/junction, or an attacker can cause one to exist before issuing GraphQL/content operations The exact network exploitability depends on how the application exposes Tina's GraphQL/content operations, but the underlying bridge bug is real and independently security-relevant. ## Recommended Fix The containment check needs to compare canonical filesystem paths, not just string-normalized paths. For example: 1. resolve the base with `fs.realpath()` 2. resolve the candidate path's parent with `fs.realpath()` 3. reject any request whose real target path escapes the real base 4. for write operations, carefully canonicalize the nearest existing parent directory before creating the final file In short: use realpath-aware containment checks for every filesystem sink, not `path.resolve(...).startsWith(...)` alone. ## Resources - `packages/@tinacms/graphql/src/database/bridge/filesystem.ts` - `packages/@tinacms/graphql/src/database/index.ts` - `packages/@tinacms/graphql/src/resolver/index.ts`

CVE-2026-34604 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-34604?
CVE-2026-34604 is a security vulnerability in @tinacms/graphql involving @tinacms/graphql's `FilesystemBridge` Path Validation Can Be Bypassed via Symlinks or Junctions under CWE-59: Improper Link Resolution Before File Access ('Link Following').
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-34604?
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-34604?
CVE-2026-34604 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2026-34604?
CVE-2026-34604 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check npm dependencies for CVE-2026-34604?
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-g9c2-gf25-3x67",
  "modified" : "2026-04-06T16:44:11Z",
  "published" : "2026-04-01T00:25:22Z",
  "aliases" : [ "CVE-2026-34604" ],
  "summary" : "@tinacms/graphql's `FilesystemBridge` Path Validation Can Be Bypassed via Symlinks or Junctions",
  "details" : "## Summary\n\n`@tinacms/graphql` uses string-based path containment checks in `FilesystemBridge`:\n\n- `path.resolve(path.join(baseDir, filepath))`\n- `startsWith(resolvedBase + path.sep)`\n\nThat blocks plain `../` traversal, but it does not resolve symlink or junction targets. If a symlink/junction already exists under the allowed content root, a path like `content/posts/pivot/owned.md` is still considered \"inside\" the base even though the real filesystem target can be outside it.\n\nAs a result, `FilesystemBridge.get()`, `put()`, `delete()`, and `glob()` can operate on files outside the intended root.\n\n## Details\n\nThe current bridge validation is:\n\n```ts\nfunction assertWithinBase(filepath: string, baseDir: string): string {\n  const resolvedBase = path.resolve(baseDir);\n  const resolved = path.resolve(path.join(baseDir, filepath));\n  if (\n    resolved !== resolvedBase &&\n    !resolved.startsWith(resolvedBase + path.sep)\n  ) {\n    throw new Error(\n      `Path traversal detected: \"${filepath}\" escapes the base directory`\n    );\n  }\n  return resolved;\n}\n```\n\nBut the bridge then performs real filesystem I/O on the resulting path:\n\n```ts\npublic async get(filepath: string) {\n  const resolved = assertWithinBase(filepath, this.outputPath);\n  return (await fs.readFile(resolved)).toString();\n}\n\npublic async put(filepath: string, data: string, basePathOverride?: string) {\n  const basePath = basePathOverride || this.outputPath;\n  const resolved = assertWithinBase(filepath, basePath);\n  await fs.outputFile(resolved, data);\n}\n\npublic async delete(filepath: string) {\n  const resolved = assertWithinBase(filepath, this.outputPath);\n  await fs.remove(resolved);\n}\n```\n\nThis is a classic realpath gap:\n\n1. validation checks the lexical path string\n2. the filesystem follows the link target during I/O\n3. the actual target can be outside the intended root\n\nThis is reachable from Tina's GraphQL/local database flow. The resolver builds a validated path from user-controlled `relativePath`, but that validation is also string-based:\n\n```ts\nconst realPath = path.join(collection.path, relativePath);\nthis.validatePath(realPath, collection, relativePath);\n```\n\nDatabase write and delete operations then call the bridge:\n\n```ts\nawait this.bridge.put(normalizedPath, stringifiedFile);\n...\nawait this.bridge.delete(normalizedPath);\n```\n\n## Local Reproduction\n\nThis was verified llocally with a real junction on Windows, which exercises the same failure mode as a symlink on Unix-like systems.\n\nTest layout:\n\n- content root: `D:\\bugcrowd\\tinacms\\temp\\junction-repro4`\n- allowed collection path: `content/posts`\n- junction inside collection: `content/posts/pivot -> D:\\bugcrowd\\tinacms\\temp\\junction-repro4\\outside`\n- file outside content root: `outside\\secret.txt`\n\nTina's current path-validation logic was applied and used to perform bridge-style read/write operations through the junction.\n\nObserved result:\n\n```json\n{\n  \"graphqlBridge\": {\n    \"collectionPath\": \"content/posts\",\n    \"requestedRelativePath\": \"pivot/owned.md\",\n    \"validatedRealPath\": \"content\\\\posts\\\\pivot\\\\owned.md\",\n    \"bridgeResolvedPath\": \"D:\\\\bugcrowd\\\\tinacms\\\\temp\\\\junction-repro4\\\\content\\\\posts\\\\pivot\\\\owned.md\",\n    \"bridgeRead\": \"TOP_SECRET_FROM_OUTSIDE\\\\r\\\\n\",\n    \"outsideGraphqlWriteExists\": true,\n    \"outsideGraphqlWriteContents\": \"GRAPHQL_ESCAPE\"\n  }\n}\n```\n\nThat is the critical point:\n\n- the path was accepted as inside `content/posts`\n- the bridge read `outside\\secret.txt`\n- the bridge wrote `outside\\owned.md`\n\nSo the current containment check does not actually constrain filesystem access to the configured content root once a link exists inside that tree.\n\n## Impact\n\n- **Arbitrary file read/write outside the configured content root**\n- **Potential delete outside the configured content root** via the same `assertWithinBase()` gap in `delete()`\n- **Breaks the assumptions of the recent path-traversal fixes** because only lexical traversal is blocked\n- **Practical attack chains** where the content tree contains a committed symlink/junction, or an attacker can cause one to exist before issuing GraphQL/content operations\n\nThe exact network exploitability depends on how the application exposes Tina's GraphQL/content operations, but the underlying bridge bug is real and independently security-relevant.\n\n## Recommended Fix\n\nThe containment check needs to compare canonical filesystem paths, not just string-normalized paths.\n\nFor example:\n\n1. resolve the base with `fs.realpath()`\n2. resolve the candidate path's parent with `fs.realpath()`\n3. reject any request whose real target path escapes the real base\n4. for write operations, carefully canonicalize the nearest existing parent directory before creating the final file\n\nIn short: use realpath-aware containment checks for every filesystem sink, not `path.resolve(...).startsWith(...)` alone.\n\n## Resources\n\n- `packages/@tinacms/graphql/src/database/bridge/filesystem.ts`\n- `packages/@tinacms/graphql/src/database/index.ts`\n- `packages/@tinacms/graphql/src/resolver/index.ts`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "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.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/security/advisories/GHSA-g9c2-gf25-3x67"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34604"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tinacms/tinacms/commit/f124eabaca10dac9a4d765c9e4135813c4830955"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tinacms/tinacms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-01T00:25:22Z",
    "nvd_published_at" : "2026-04-01T17:28:41Z"
  }
}