Skip to content
firewallpulse
Bits, bytes and breaking security news
Vulnerabilities

TinaCMS CLI RCE in Pre-3.0.0 Versions Lets Attackers Run Code via Git Branch Names

A high-severity injection flaw in older versions of the TinaCMS CLI allows attackers to execute arbitrary code during preview builds by manipulating Git branch names.

TinaCMS CLI RCE in Pre-3.0.0 Versions Lets Attackers Run Code via Git Branch Names
Illustration: Firewall Pulse

Key points

  • CVE-2026-108259 carries a CVSS score of 8.2 and is rated high severity.
  • The vulnerability exists in @tinacms/cli versions prior to 3.0.0.
  • Attackers can inject JavaScript expressions that run with build process privileges.

The TinaCMS command-line interface suffers from a code injection vulnerability that stems from improper handling of Git branch data. According to the National Vulnerability Database, this flaw affects versions of @tinacms/cli before 3.0.0. The issue allows an attacker to inject arbitrary JavaScript code into generated client modules during preview builds.

Root cause

The @tinacms/cli tool reads Git branch values from environment variables such as VERCEL_GIT_COMMIT_REF, GITHUB_BRANCH, or HEAD. The source code incorporates these raw values into API URLs without applying any escaping or encoding functions. This occurs in specific files within the next/codegen directory, where the branch name is concatenated directly into string literals.

Attack path

A crafted Git branch name containing a quote character can terminate the generated JavaScript string literal. This allows the injection of an arbitrary expression that executes when the generated client module is imported. The injected code runs with the privileges of the build process, potentially accessing environment credentials or modifying deployment artifacts.

Affected versions

  • @tinacms/cli versions less than 3.0.0 are vulnerable to this injection flaw.
  • Version 3.0.0 has been released to patch CVE-2026-108259.
  • The vulnerability is tracked as CVE-2026-108259 with a CVSS score of 8.2.

Mitigation

  • Upgrade @tinacms/cli to version 3.0.0 or later to resolve the issue.
  • Review generated client.ts files for unexpected JavaScript expressions during builds.
  • Audit Git branch naming conventions to prevent the use of special characters.
  • Monitor build logs for signs of code execution anomalies or network requests.

What to do and how to stay safe: TinaCMS

  • Audit your dependency tree to confirm the version of @tinacms/cli in use.
  • Restrict Git branch naming policies to exclude characters that could break string literals.
  • Monitor build environments for unexpected outbound network connections or file modifications.
  • Once the vendor provides an update, test the upgrade in a staging environment first.

General security guidance from the Firewall Pulse newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

What is the severity of CVE-2026-108259?

The National Vulnerability Database rates this vulnerability as high severity with a CVSS score of 8.2.

Which versions of TinaCMS CLI are affected?

All versions of @tinacms/cli prior to 3.0.0 are vulnerable to this code injection flaw.

How is the exploit triggered?

The exploit is triggered by using a crafted Git branch name that closes a JavaScript string literal and injects executable code.

Sources

  1. CVE Program
  2. GitHub Advisory Database
TinaCMSCVE-2026-108259code injection@tinacms/cliGit branch

Related stories