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.
OpenCVE Enrichment
Github GHSA