Executive brief
TinaCMS is a GraphQL-based headless CMS platform used to manage website content. A path traversal vulnerability allows unauthenticated attackers to overwrite arbitrary files on the server, including critical configuration files and build scripts. This could lead to service compromise, code execution, or data manipulation.
Technical details
A path traversal vulnerability exists in @tinacms/graphql's path validation logic (getValidatedPath function in resolver/index.ts). The regex-based validation fails to recognize backslashes (\) as directory separators on non-Windows platforms (Linux/macOS), allowing attackers to bypass the check using payloads like "x\..\..\..\package.json" in the relativePath parameter of GraphQL mutations. The validation flaw, combined with platform-specific path normalization in fs modules, permits unauthenticated attackers with network access to the GraphQL API to write and overwrite arbitrary files within the project root. Patches are available in version 2.2.2 and later.
Affected products
- TinaCMS @tinacms/graphql <= 2.2.1
Timeline
- 2026-03-30: disclosed
- 2026-03-30: patched: Fixed in version 2.2.2