Read the docs

Code injection in Tina CLI via unescaped Git branch name

Priority HIGH 71CWE-94Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
Code execution
Confidentiality · integrity · availability
High · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.

Summary

The tinacms and @tinacms/cli packages before 3.0.0 are affected. The CLI places a Git branch name into generated JavaScript string literals without escaping it, so a crafted branch name containing a quote can inject code (CWE-94). An attacker with low privileges who can create such a branch name can run code when a preview build imports the generated client, with the build process privileges, and can read credentials or change deployment artifacts.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00332 26th percentileScored 2026-11-07
Fix Fixed tinacms (tinacms): 3.0.0cli (@tinacms): 3.0.0+1 more product

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
tinacmstinacmsbefore 3.0.03.0.0Patch availableCNA
tinacmsclibefore 3.0.03.0.0Patch availableCNA
—@tinacms/cli (npm)before 3.0.03.0.0Patch availableGHSA-pwhx-cvv3-qj5c
  • tinacms Vendortinacms Affected before 3.0.0 Fixed in 3.0.0 Patch available CNA
  • cli Vendortinacms Affected before 3.0.0 Fixed in 3.0.0 Patch available CNA
  • @tinacms/cli (npm) Vendor— Affected before 3.0.0 Fixed in 3.0.0 Patch available GHSA-pwhx-cvv3-qj5c

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:ssw:tinacms\/cli:*:*:*:*:*:*:*:*——tinacms
  • cpe:2.3:a:ssw:tinacms\/cli:*:*:*:*:*:*:*:* Versions — — ·tinacms

Remediation

Upgrade @tinacms/cli to 3.0.0, the fixed version listed for the npm package. The sources list no fixed version for tinacms.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA tinacms (tinacms) Fixed in 3.0.0
  • Fix · CNA cli (@tinacms) Fixed in 3.0.0
  • Fix · GHSA-pwhx-cvv3-qj5c @tinacms/cli (npm) Fixed in 3.0.0 Advisory →

Timeline

  1. 2026-10-10 Threatist record created from CVE-2026-108259
  2. 2026-10-10 Alias added: GHSA-pwhx-cvv3-qj5c
  3. 2026-10-10 Fix available: npm/@tinacms/[email protected] · GHSA-pwhx-cvv3-qj5c
  4. 2026-10-10 CVSS score added · GHSA-pwhx-cvv3-qj5c
  5. 2026-10-10 Weakness changed · GHSA-pwhx-cvv3-qj5c
  6. 2026-10-10 5 new references · GHSA-pwhx-cvv3-qj5c
  7. 2026-10-11 Priority changed: MEDIUM → LOW
  8. 2026-10-14 CISA SSVC decision points changed
  9. 2026-10-14 Priority changed: LOW → HIGH

References

  • TI-2026-22987 Cross-Origin File Exfiltration via CORS Misconfiguration + Path Traversal in TinaCMS CVSS 3.1CRITICAL 9.7
  • TI-2026-70295 TinaCMS admin preview frames attacker-controlled origin CVSS 3.1CRITICAL 9.3
  • TI-2026-45239 Tina: [Broken Access Control] letting any TinaCloud user authorize against any self-hosted site CVSS 3.1HIGH 8.8
  • TI-2026-26851 @tinacms/graphql's `FilesystemBridge` Path Validation Can Be Bypassed via Symlinks or Junctions CVSS 3.1HIGH 8.8
  • TI-2026-22988 Path Traversal Leading to Arbitrary File Read, Write and Delete in TinaCMS CVSS 3.1HIGH 8.4
  • TI-2026-26850 @tinacms/graphql's Media Endpoints Can Escape the Media Root via Symlinks or Junctions CVSS 3.1HIGH 8.3
See all 19 →

Sources