CVE-2026-108259

Tina: Code injection via unescaped Git branch name in generated client source

Published Oct 9, 2026 CVSS 3.1 · 8.2 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Tina
Tina cli
Tina tinacms
Vendors & Products Tina
Tina cli
Tina tinacms
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'}

Weaknesses
  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 14, 2026, 2:12 AM
Reserved
Oct 9, 2026, 5:33 PM
Status
Deferred
Published
Oct 9, 2026, 9:17 PM
Modified
Oct 16, 2026, 8:04 PM