Description
Tina is a headless content management system. Prior to 3.0.0, @tinacms/cli reads Git branch values from VERCEL_GIT_COMMIT_REF, GITHUB_BRANCH, or HEAD, incorporates the raw value into the API URL, and interpolates that URL into JavaScript string literals in packages/@tinacms/cli/src/next/codegen/index.ts and packages/@tinacms/cli/src/next/codegen/codegen/plugin.ts. A crafted Git-valid branch name containing a quote can terminate the generated string and inject an expression that executes when the generated client module is imported during a preview build. The injected code runs with the build process privileges and can read environment credentials, modify deployment artifacts, or make network requests. This issue is fixed in version 3.0.0.
Published: 2026-10-09
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

A code injection flaw exists in the TinaCMS CLI prior to version 3.0.0. The tool reads Git branch names from environment variables such as VERCEL_GIT_COMMIT_REF and GITHUB_BRANCH, then directly injects these raw values into JavaScript string literals that are compiled into the client source. An attacker can provide a Git‑valid branch name that contains a quote, which terminates the surrounding string and injects malicious JavaScript. When the generated module is imported during a preview or build process, the injected code executes with the build process privileges, able to read environment credentials, modify deployment artifacts, or make network requests. This vulnerability is categorized as CWE‑94, code injection.

Affected Systems

The affected systems are the TinaCMS command‑line interface and the TinaCMS content management system itself. Versions before 3.0.0 are impacted; the remediation is available in the 3.0.0 release and later.

Risk and Exploitability

Risk assessment shows a CVSS score of 8.2 indicating high severity, with no EPSS score available and the vulnerability not listed in the CISA KEV catalog. The likely attack vector requires control over the Git branch name exposed to the CI environment, such as in Vercel or GitHub Actions preview builds. Successful exploitation would allow an attacker to run arbitrary code during site builds, compromising the integrity and confidentiality of the deployment artifacts.

Generated by OpenCVE AI on October 9, 2026 at 22:52 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to TinaCMS CLI and TinaCMS 3.0.0 or later to remove the injection vector.
  • Validate or sanitize branch names before they are passed to the CLI; enforce a whitelist of allowed characters for VERCEL_GIT_COMMIT_REF, GITHUB_BRANCH, and HEAD values.
  • Audit CI/CD pipelines to ensure that only trusted users can set these environment variables or push branches that trigger builds, and remove any ability to set arbitrary branch names from external sources.

Generated by OpenCVE AI on October 9, 2026 at 22:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-pwhx-cvv3-qj5c Tina: Code injection via unescaped Git branch name in generated client source
History

Wed, 14 Oct 2026 03:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Sun, 11 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
First Time appeared Tina
Tina cli
Tina tinacms
Vendors & Products Tina
Tina cli
Tina tinacms

Fri, 09 Oct 2026 21:00:00 +0000

Type Values Removed Values Added
Description Tina is a headless content management system. Prior to 3.0.0, @tinacms/cli reads Git branch values from VERCEL_GIT_COMMIT_REF, GITHUB_BRANCH, or HEAD, incorporates the raw value into the API URL, and interpolates that URL into JavaScript string literals in packages/@tinacms/cli/src/next/codegen/index.ts and packages/@tinacms/cli/src/next/codegen/codegen/plugin.ts. A crafted Git-valid branch name containing a quote can terminate the generated string and inject an expression that executes when the generated client module is imported during a preview build. The injected code runs with the build process privileges and can read environment credentials, modify deployment artifacts, or make network requests. This issue is fixed in version 3.0.0.
Title Tina: Code injection via unescaped Git branch name in generated client source
Weaknesses CWE-94
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-14T02:12:59.336Z

Reserved: 2026-10-09T17:33:15.409Z

Link: CVE-2026-108259

cve-icon Vulnrichment

Updated: 2026-10-14T02:12:22.823Z

cve-icon NVD

Status : Deferred

Published: 2026-10-09T21:17:04.017

Modified: 2026-10-16T20:04:29.760

Link: CVE-2026-108259

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-11T12:25:45Z

Weaknesses
  • CWE-94

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