CVE-2026-108259: @tinacms/cli Code Injection via Unescaped Git Branch Name
Summary
CVE-2026-108259: Tina: Code injection via unescaped Git branch name in generated client source. Affects @tinacms/cli versions < 3.0.0. Fixed in 3.0.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The @tinacms/cli package is a command-line interface for TinaCMS, a headless content management system that allows developers to create and manage content in a user-friendly way. It facilitates the integration of content management into applications by generating client-side code. However, a vulnerability exists in how it handles Git branch names, which can lead to code injection attacks.
Vulnerability Detail
The vulnerability arises from the @tinacms/cli package inserting raw Git branch names into generated client source code without proper escaping or encoding. This oversight allows an attacker to craft a Git branch name that can close string literals and inject arbitrary JavaScript code. The injected code executes during the build process, potentially leading to unauthorized access to environment variables, modification of build artifacts, and other malicious actions. The vulnerability is particularly severe in environments like Vercel or GitHub Actions, where build-time execution can expose sensitive information.
How To Fix
Latest published version: 4.0.3 as of 22 Oct 2026
npm install @tinacms/cli@4.0.3
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
3.0.0
This is the first release that contains the fix.
npm install @tinacms/cli@3.0.0
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using Git branch names that contain special characters or single quotes. Additionally, consider passing runtime values through a JSON configuration file that the generated client reads at runtime, rather than interpolating them directly into source templates.
Conclusion
The CVE-2026-108259 vulnerability in the @tinacms/cli package poses a significant risk due to the potential for code injection via unescaped Git branch names. It is crucial for developers using this package to update to the patched version and implement the recommended fixes to mitigate the risk of exploitation.
See every vulnerability recorded for @tinacms/cli →
FAQ
CVE-2026-108259 is a vulnerability in the @tinacms/cli package that allows for code injection via unescaped Git branch names in generated client source code.
An attacker can create a malicious Git branch name that injects JavaScript code into the generated client source, which executes during the build process.
The impacts include unauthorized access to environment variables, modification of build artifacts, and the ability to execute arbitrary code with the privileges of the build process.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By uploading your package-lock.json file to Vulert's playground, you can check for vulnerabilities without needing to sign up.
The CVSS score for this vulnerability is 8.2, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for @tinacms/cli.