Arbitrary Code Injection Affecting @tinacms/cli package, versions <2.4.3


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.08% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-TINACMSCLI-17420442
  • published23 Jun 2026
  • disclosed19 Jun 2026
  • creditUnknown

Introduced: 19 Jun 2026

NewCVE-2026-54074  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade @tinacms/cli to version 2.4.3 or higher.

Overview

@tinacms/cli is a package used to set up your project with Tina Cloud configuration, and run a local version of the Tina Cloud content-api.

Affected versions of this package are vulnerable to Arbitrary Code Injection through the addVariablesToCode/makeFieldsWithInternalCode process in codeTransformer.ts. An attacker can execute injected code in the generated template file by supplying Forestry field labels, names, or option values that reproduce the internal marker and get unquoted into raw source during migration. The vulnerable path serializes untrusted Forestry YAML via JSON.stringify and then strips a hard-coded sentinel using a regular expression, allowing a forged marker to turn attacker-controlled text into executable template code. In affected migrations, this can corrupt the generated content model files and let a malicious config author inject arbitrary JavaScript into the output consumed by the TinaCMS tooling.

CVSS Base Scores

version 4.0
version 3.1