CVE-2026-54074 @tinacms/cli: Remote Code Execution in @tinacms/cli via Forestry migration — unsanitised __TINA_INTERNAL__ marker in user-controlled YAML labels
Attackers can inject arbitrary JavaScript into generated files via unsanitized YAML labels, leading to code execution when developers run the CLI.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-54074?
CVE-2026-54074 is a high-severity code injection vulnerability in tinacms, published on 1 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2026-54074?
2 open source packages ship an affected version, including @tinacms/cli.
| Package | Affected | Fixed in |
|---|---|---|
@tinacms/cli npm | All versions | 2.4.3 |
@tinacms/cli npm | All versions | 2.4.3 |
How do I fix CVE-2026-54074?
Upgrade @tinacms/cli to 2.4.3 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-54074 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-54074 exists.
Sources
Also known as GHSA-4936-9hrh-qqpw.