CVE-2026-54074 Overview
CVE-2026-54074 is a Remote Code Execution vulnerability in the @tinacms/cli package, the command-line tool for Tina, a headless content management system. Versions prior to 2.4.3 fail to sanitize user-controlled label and name fields from .forestry/**/*.yml files during the Forestry-to-Tina migration command. An attacker who controls a Forestry-style project can inject arbitrary JavaScript into the generated tina/templates.{ts,js} file. The injected code executes at module top level when the developer runs tinacms dev or tinacms build, running with the developer's local privileges. The issue is fixed in @tinacms/cli version 2.4.3.
Critical Impact
Attacker-controlled Forestry project files trigger arbitrary JavaScript execution on a developer's workstation when running Tina migration or build commands.
Affected Products
- Tina CMS (@tinacms/cli) versions prior to 2.4.3
- Developer workstations running tinacms dev or tinacms build against a migrated project
- CI/CD pipelines that execute the Tina build against untrusted Forestry sources
Discovery Timeline
- 2026-07-01 - CVE-2026-54074 published to NVD
- 2026-07-02 - Last updated in NVD database
Technical Details for CVE-2026-54074
Vulnerability Analysis
The flaw is a code injection issue classified under [CWE-94]. The Forestry-to-Tina migration builds a stringified JSON representation of collections, then post-processes it with an internal helper named addVariablesToCode. This helper unquotes any value matching the marker pattern __TINA_INTERNAL__:::(.*?)::: so that literal JavaScript identifiers and expressions can be emitted into the generated module. Because the helper trusts its own marker, any text that reproduces the marker is spliced verbatim into the output source file.
The migration reads label and name fields directly from .forestry/**/*.yml and inserts them into the JSON string without escaping or validation. An attacker who authors these YAML files can embed the internal marker together with arbitrary JavaScript. The payload lands at module top level in tina/templates.ts or tina/templates.js and runs the moment Node.js evaluates the file during tinacms dev or tinacms build.
Root Cause
The root cause is unsanitized concatenation of user-controlled strings into generated source code. The addVariablesToCode helper treats a text marker as a trust boundary, but the marker itself is not authenticated and the input feeding the marker region is not filtered.
Attack Vector
Exploitation requires the victim developer to import or migrate a malicious Forestry project and then run a local Tina command. The CVSS vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H reflects a local attack path with required user interaction, yielding full compromise of the developer's user context, including source code theft, credential exfiltration, and pivot into connected repositories or cloud accounts.
// No verified public exploit code is available.
// Consult the GitHub Security Advisory linked below for technical details.
Detection Methods for CVE-2026-54074
Indicators of Compromise
- Presence of the literal string __TINA_INTERNAL__::: inside any .forestry/**/*.yml file or within generated tina/templates.ts or tina/templates.js files.
- Unexpected outbound network connections initiated by node processes launched from tinacms dev or tinacms build.
- Unrecognized child processes, shell invocations, or file writes originating from the Tina CLI during migration or build.
Detection Strategies
- Scan repositories for @tinacms/cli versions below 2.4.3 in package.json, package-lock.json, pnpm-lock.yaml, and yarn.lock.
- Grep source trees and Forestry archives for the __TINA_INTERNAL__::: marker in YAML content, which should never appear in legitimate authoring data.
- Review generated tina/templates.{ts,js} files in code review for top-level statements that are not simple exports of collection objects.
Monitoring Recommendations
- Alert on developer endpoints when node processes spawned by tinacms create child shells, write to ~/.ssh, or read credential stores.
- Log and review CI/CD job output for Tina migration steps executed against externally sourced repositories.
- Track EDR telemetry for outbound connections from Node.js processes during tinacms dev and tinacms build executions.
How to Mitigate CVE-2026-54074
Immediate Actions Required
- Upgrade @tinacms/cli to version 2.4.3 or later across all developer workstations, project templates, and CI runners.
- Audit any repository migrated from Forestry using earlier Tina CLI versions for tampering in tina/templates.ts or tina/templates.js.
- Rotate credentials, tokens, and SSH keys that were accessible on any workstation that ran migration against untrusted Forestry input.
Patch Information
The maintainers fixed the issue in @tinacms/cli version 2.4.3 by sanitizing input flowing into addVariablesToCode so that label and name values cannot forge the internal marker. See the GitHub Security Advisory GHSA-4936-9hrh-qqpw for full remediation notes.
Workarounds
- Do not run the Forestry-to-Tina migration against .forestry/ content from untrusted sources until the CLI is upgraded.
- Perform migrations inside an ephemeral container or sandbox account with no access to production credentials or SSH keys.
- Manually review .forestry/**/*.yml files for the __TINA_INTERNAL__::: marker and reject any project that contains it.
# Configuration example
npm install --save-dev @tinacms/cli@^2.4.3
npx tinacms --version
grep -R "__TINA_INTERNAL__:::" .forestry/ tina/ || echo "No injection markers found"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

