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.
OpenCVE Enrichment
Github GHSA