CVE-2026-54074: Tina CMS Remote Code Execution via Forestry Migration
Tina is a headless content management system used by developers to manage content without a traditional admin interface. A critical flaw exists in versions of @tinacms/cli before 2.4.3 that allows arbitrary code execution when developers migrate projects from Forestry (an older CMS) to Tina. If an attacker controls or compromises a Forestry-style project configuration, they can inject malicious JavaScript code that runs automatically when a developer executes standard Tina commands. The injected code executes with the developer's full permissions, potentially compromising the entire build environment, source code repositories, and deployment infrastructure.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.8 HIGH · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses (CWE)
- CWE-94
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-07-01 / 2026-07-02
NVD description (verbatim)
Tina is a headless content management system. @tinacms/cli versions prior to 2.4.3 contain a Remote Code Execution vulnerability in the Forestry-to-Tina migration command. The internal helper addVariablesToCode unquotes any value matching the marker "__TINA_INTERNAL__:::(.*?):::" inside the stringified collection JSON. User-supplied label and name fields from .forestry/**/*.yml are placed into that JSON without any sanitisation. An attacker who controls a Forestry-style project can therefore inject arbitrary JavaScript into the generated tina/templates.{ts,js} file. The injected code is written at module top level, so it executes the moment the developer runs tinacms dev or tinacms build, with the developer's privileges. This issue has been fixed in version 2.4.3.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability resides in the Forestry-to-Tina migration functionality within @tinacms/cli. The migration process uses an internal helper function, addVariablesToCode, that processes user-supplied metadata from Forestry YAML configuration files (.forestry/**/*.yml). This function searches for and unquotes any string matching the marker pattern "__TINA_INTERNAL__:::(.*?):::" within stringified JSON. Because the label and name fields from Forestry configuration are inserted into this JSON without sanitization, an attacker can craft a malicious Forestry project where these fields contain the marker pattern followed by arbitrary JavaScript code. When the developer initiates migration or runs tinacms dev or tinacms build, this code is written directly into the generated tina/templates.ts or tina/templates.js file at module top level and executes immediately with developer privileges. This is a code injection vulnerability (CWE-94: Improper Control of Generation of Code) that bypasses the sanitization layer entirely.
Business impact
A successful exploit compromises the developer's local environment and CI/CD pipeline. An attacker gains code execution during the build process, enabling theft of source code, injection of backdoors into shipped applications, exfiltration of secrets and API keys stored in environment variables, modification of build artifacts, and lateral movement into deployment infrastructure. Organizations using Tina for content-driven applications may face supply chain contamination if the attacker modifies application code before deployment. The impact extends beyond a single developer to entire teams and customer deployments if compromised builds are released. Additionally, any Git commits pushed from a compromised environment could carry malicious payloads into version control history.
Affected systems
@tinacms/cli versions prior to 2.4.3 are vulnerable. This affects developers and teams actively using Tina CMS, particularly those migrating from Forestry. The vulnerability is triggered only during Forestry-to-Tina migration workflows or when developers work with Forestry-style project configurations. Teams using Tina without Forestry migration and organizations that have already upgraded to 2.4.3 or later are not affected.
Exploitability
This vulnerability requires the attacker to control or compromise a Forestry-style project configuration that a developer then attempts to migrate into Tina. The attack vector is local (the developer's machine or shared development environment), but the prerequisite is either social engineering (tricking a developer into migrating a malicious public Forestry project) or compromise of an existing project repository. Once the developer runs the migration or standard Tina commands, code executes automatically without additional interaction required. The barrier to exploitation is moderate: an attacker must either distribute a malicious Forestry project template or compromise an existing one, but the execution is reliable and occurs with developer privileges.
Remediation
Upgrade @tinacms/cli to version 2.4.3 or later immediately. This version patches the addVariablesToCode function to properly sanitize user-supplied input from Forestry configurations. After upgrading, developers should re-run any pending migrations on a clean, isolated machine and audit the generated tina/templates.ts or tina/templates.js files for any suspicious code before committing to version control. Teams should also review Git logs and build artifacts from the time the vulnerability was discovered to identify whether any compromised code entered production.
Patch guidance
Update @tinacms/cli by running 'npm update @tinacms/cli' or 'yarn upgrade @tinacms/cli' to pull version 2.4.3 or later. Verify the installed version with 'npm list @tinacms/cli'. Apply this update across all development machines, CI/CD systems, and containerized build environments. Since this is a toolchain package, ensure all team members upgrade before attempting Forestry migrations. No configuration changes are required post-upgrade; the fix is automatic upon installation.
Detection guidance
Monitor for execution of tinacms dev and tinacms build commands within your environment, particularly in CI/CD logs. Inspect generated tina/templates.ts or tina/templates.js files for unexpected code patterns, especially those containing fetch, eval, exec, or child_process calls, or code that accesses environment variables or makes network requests. Review .forestry/**/*.yml configuration files in repositories for suspicious label or name field values containing code-like syntax or obfuscated patterns. Check package-lock.json or yarn.lock to identify if @tinacms/cli versions below 2.4.3 are pinned in any active projects. If your organization uses Forestry, audit who has permissions to modify .forestry configuration files and whether external contributors have submitted PRs affecting those files.
Why prioritize this
This vulnerability scores 7.8 (HIGH) on CVSS 3.1 due to high impact (confidentiality, integrity, and availability all compromised), low attack complexity, and no privilege requirements—only user interaction (developer action). Although it requires local access and an attacker must control a Forestry project, the consequences of successful exploitation are severe: full developer environment compromise, supply chain contamination, and potential widespread impact on shipped software. The automated execution and developer privilege context elevate risk significantly. Any organization using Tina CMS with Forestry migrations or projects should treat this as urgent, especially if Forestry projects are shared across teams or pulled from public sources.
Risk score, explained
CVSS 3.1 score of 7.8 (HIGH) reflects: Attack Vector: Local (AV:L) — the developer's machine must run the vulnerable command; Attack Complexity: Low (AC:L) — no special conditions required; Privileges Required: None (PR:N) — any user on the machine can trigger it; User Interaction: Required (UI:R) — the developer must initiate migration or a Tina command; Scope: Unchanged (S:U) — impact is confined to the affected system; Confidentiality: High (C:H), Integrity: High (I:H), Availability: High (A:H) — arbitrary code execution enables all three impact types. The score appropriately reflects a critical toolchain vulnerability that compromises development infrastructure.
Frequently asked questions
Can this vulnerability affect production systems or end users directly?
No. The vulnerability executes only when a developer runs Tina CLI commands on their local machine or in CI/CD pipelines during build time. However, if the injected code modifies the application code or build artifacts before deployment, it can indirectly compromise production systems and affect end users. The primary risk is supply chain contamination, not direct attacks on running applications.
Do I need to worry if I use Tina but have never used Forestry?
Your direct risk is lower but not zero. The vulnerability is triggered during Forestry-to-Tina migration or when working with Forestry-style project configurations. If your team only uses native Tina projects without Forestry backgrounds, you are unlikely to encounter this code path. However, you should still upgrade to 2.4.3 or later as best practice and to close the attack surface entirely.
What if a developer already ran a migration from a malicious Forestry project before the patch was available?
Audit the generated tina/templates.ts or tina/templates.js files and your Git history for unexpected code. Check environment variables and secrets that may have been accessed during the build, rotate any that were compromised, and review any build artifacts or deployments that occurred after the migration. If you cannot determine whether compromise occurred, treat the affected developer's machine as untrusted and reimage it after the patch is applied.
Is there a workaround if I cannot upgrade immediately?
The safest interim measure is to avoid Forestry migrations entirely and isolate any Forestry project work to air-gapped or non-production machines. Do not run tinacms dev or tinacms build on machines with access to production secrets or repositories. However, upgrading to 2.4.3 is the only complete remediation and should be prioritized.
This analysis is based on the CVE description and publicly available information as of the publication date. No exploit code or weaponized proof-of-concept has been included. Organizations should verify patch availability and applicability to their specific environment through official Tina CMS and npm package advisories. This vulnerability does not appear on CISA's Known Exploited Vulnerabilities (KEV) catalog as of publication, but absence from KEV does not indicate low risk. All organizations using affected @tinacms/cli versions should prioritize patching regardless of observed exploitation. Consult the official Tina CMS security advisory and your software supply chain risk management procedures before deployment. Source: NVD (public-domain), retrieved 2026-08-10. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10904HIGHChrome V8 Sandbox Escape Remote Code Execution
- CVE-2026-10928HIGHScript Injection in Google Chrome Headless – CVSS 8.8 High Severity
- CVE-2026-11231HIGHChrome Safe Browsing Code Execution on macOS – Patch Now
- CVE-2026-11688HIGHChrome SVG Sandbox Escape RCE Vulnerability – Patch Urgently
- CVE-2026-12242HIGHAdRotate Banner Manager PHP Code Injection Vulnerability
- CVE-2026-12252HIGHNLTK Stanford JAR Code Execution Flaw
- CVE-2026-13500HIGHANTLR4 Code Injection Vulnerability (Grammar Action Block Handler)
- CVE-2026-13749HIGHSnowflake CLI Code Injection Vulnerability in Snowpark Annotation Processor