Loading advisory.
Loading advisory.
@tinacms/graphql has Path Traversal that leads to overwrite of arbitrary files
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.
Published 2026-03-30 17:07 UTC · Modified 2026-04-06 17:04 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| @tinacms/graphql | npm | < 2.2.2 | 2.2.2 | npm install @tinacms/graphql@2.2.2 |
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.
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: assertWithinBase function.
packages/@tinacms/graphql/src/resolver/index.ts: getValidatedPath function.
Start the TinaCMS development server.
Send a malicious GraphQL mutation to overwrite a project file (e.g., package.json):
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 } }"}'Observe that the root 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" />
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, 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
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.004 on 2026-11-24 to 0.007 on 2026-11-30, over 3 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |
| 2026-11-26 | 0.007 | 0.004 | v2026.06.15 |
| 2026-11-30 | 0.007 | 0.007 | v2026.06.15 |