CVE-2025-68278 Overview
CVE-2025-68278 affects TinaCMS, a headless content management system used to manage markdown-based content such as blog posts. Versions prior to 3.1.1 use the gray-matter package in an insecure manner. Attackers who can control the content of processed markdown files can execute arbitrary code on the host parsing those files. The flaw is classified as Improper Control of Generation of Code [CWE-94]. Fixed releases are tinacms 3.1.1, @tinacms/cli 2.0.4, and @tinacms/graphql 2.0.3.
Critical Impact
An authenticated attacker able to submit or modify markdown content can achieve arbitrary code execution against the TinaCMS backend.
Affected Products
- tinacms prior to version 3.1.1
- @tinacms/cli prior to version 2.0.4
- @tinacms/graphql prior to version 2.0.3
Discovery Timeline
- 2025-12-18 - CVE-2025-68278 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-68278
Vulnerability Analysis
TinaCMS parses markdown files containing YAML front matter using the gray-matter package. By default, gray-matter supports multiple front matter engines, including a JavaScript engine that evaluates arbitrary code embedded in the front matter block. When a parser does not restrict engines or disable evaluation, an attacker controlling the markdown source can include a JavaScript front matter block that is executed during parsing.
The vulnerability is categorized under [CWE-94] (Improper Control of Generation of Code). Exploitation results in code execution in the Node.js process running TinaCMS, which typically has access to repository content, environment variables, and connected services.
The attack vector is network-based and requires low privileges plus user interaction, consistent with content authoring workflows where an attacker-controlled markdown file is processed by the CMS pipeline.
Root Cause
The root cause is unsafe configuration of the gray-matter parser within TinaCMS. The library exposes a JavaScript engine that runs code from the front matter region of markdown documents. TinaCMS invoked the parser without disabling this engine, allowing executable front matter to be processed during normal content operations.
Attack Vector
An attacker with permission to author or modify markdown content, or whose markdown reaches the CMS through a pull request, sync, or import workflow, can craft a payload that runs during parsing. The malicious payload uses the ---js front matter delimiter recognized by gray-matter, which causes the embedded JavaScript to be evaluated when TinaCMS or its GraphQL layer processes the file.
No verified public exploit code is available for CVE-2025-68278. The vulnerability mechanism is documented in the GitHub Security Advisory GHSA-529f-9qwm-9628 and the upstream fix commit.
Detection Methods for CVE-2025-68278
Indicators of Compromise
- Markdown files containing ---js front matter delimiters or executable JavaScript inside YAML front matter blocks.
- Unexpected child processes spawned by Node.js workers running tinacms, @tinacms/cli, or @tinacms/graphql.
- Outbound network connections from the TinaCMS process to unfamiliar hosts shortly after content ingestion.
- New or modified files in the content repository submitted by accounts without prior authoring history.
Detection Strategies
- Inspect markdown content in repositories and pull requests for the ---js front matter marker or function-like constructs in front matter.
- Monitor process lineage of Node.js services running TinaCMS for unexpected children such as sh, bash, curl, or wget.
- Audit installed package versions in package-lock.json and yarn.lock for tinacms below 3.1.1, @tinacms/cli below 2.0.4, or @tinacms/graphql below 2.0.3.
Monitoring Recommendations
- Log all markdown ingestion events and correlate them with authentication identity for accountability.
- Alert on outbound connections originating from CMS build or preview processes to non-allowlisted destinations.
- Track filesystem writes outside the expected content directory by TinaCMS service accounts.
How to Mitigate CVE-2025-68278
Immediate Actions Required
- Upgrade to tinacms 3.1.1, @tinacms/cli 2.0.4, and @tinacms/graphql 2.0.3 or later.
- Audit existing markdown content for ---js front matter blocks and remove any unauthorized JavaScript.
- Rotate secrets and tokens accessible to the TinaCMS runtime if compromise is suspected.
- Restrict markdown authoring privileges to trusted users until patches are applied.
Patch Information
The fix is delivered in tinacms version 3.1.1, @tinacms/cli version 2.0.4, and @tinacms/graphql version 2.0.3. Implementation details are available in the TinaCMS fix commit fa7c27a and the GitHub Security Advisory GHSA-529f-9qwm-9628.
Workarounds
- If immediate patching is not possible, configure gray-matter calls to disable the JavaScript engine by passing an explicit engines map that excludes javascript.
- Run TinaCMS build and preview workers in a sandboxed environment with no outbound network access and minimal filesystem permissions.
- Require code review for any change introducing or modifying markdown front matter before content is processed by the CMS.
# Configuration example: upgrade affected TinaCMS packages
npm install tinacms@^3.1.1 @tinacms/cli@^2.0.4 @tinacms/graphql@^2.0.3
# Verify installed versions
npm ls tinacms @tinacms/cli @tinacms/graphql
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

