Description
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.
Published: 2026-07-01
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Tina is a headless content management system. @tinacms/cli versions prior to 2.4.3 contain a Remote Code Execution flaw 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. Consequently, an attacker who controls a Forestry‑style project can 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, running with the developer’s privileges. This issue has been fixed in version 2.4.3.

Affected Systems

The affected product is @tinacms/cli from the tinacms vendor. All releases prior to 2.4.3 are vulnerable. The flaw manifests when the Forestry‑to‑Tina migration Forestry‑style YAML files.

Risk and Exploitability

The CVSS score of 7.8 classifies this flaw as High, with the EPSS score being less than 1%, indicating a low probability of exploitation in the wild at this time. It is not listed in the CISA KEV catalog. The likely attack vector is an attacker who gains control over a Forestry‑style project or its YAML labels, enabling them to embed malicious code that will be executed on any machine that runs the migration command. Because the code runs with the developer’s privileges, the impact can extend to the host system, build environment. While exploitation requires specific conditions, the ability to inject code that runs during normal development or build processes is sufficient to warrant a high‑risk assessment.

Generated by OpenCVE AI on July 15, 2026 at 10:11 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply @tinacms/cli version 2.4.3 or later, which eliminates the code injection weakness captured by CWE‑94.
  • If an upgrade is not immediately possible, sanitize or remove any "__TINA_INTERNAL__:::" markers from user‑supplied YAML labels before executing the migration to mitigate the injection flaw.
  • Restrict access to Forestry‑style projects and enforce strict role‑based controls so that only trusted developers can provide YAML labels, reducing the opportunity for unauthorized code injection.

Generated by OpenCVE AI on July 15, 2026 at 10:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4936-9hrh-qqpw @tinacms/cli: Remote Code Execution in @tinacms/cli via Forestry migration — unsanitised __TINA_INTERNAL__ marker in user-controlled YAML labels
History

Thu, 02 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
Description 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.
Title @tinacms/cli: Remote Code Execution via Forestry migration — unsanitised __TINA_INTERNAL__ marker in user-controlled YAML labels
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-02T15:35:56.343Z

Reserved: 2026-06-11T18:44:47.759Z

Link: CVE-2026-54074

cve-icon Vulnrichment

Updated: 2026-07-02T15:35:29.917Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-15T10:15:04Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')